<?php

interface DateTimeInterface {
    const ATOM = 'Y-m-d\TH:i:sP';
    const COOKIE = 'l, d-M-y H:i:s T';
    const ISO8601 = 'Y-m-d\TH:i:sO';
    const RFC822 = 'D, d M y H:i:s O';
    const RFC850 = 'l, d-M-y H:i:s T';
    const RFC1036 = 'D, d M y H:i:s O';
    const RFC1123 = 'D, d M Y H:i:s O';
    const RFC2822 = 'D, d M Y H:i:s O';
    const RFC3339 = 'Y-m-d\TH:i:sP';
    const RFC3339_EXTENDED = 'Y-m-d\TH:i:s.vP';
    const RFC7231 = 'D, d M Y H:i:s \G\M\T';
    const RSS = 'D, d M Y H:i:s O';
    const W3C = 'Y-m-d\TH:i:sP';
    
    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the difference between two DateTime objects
     * @link http://www.php.net/manual/en/datetime.diff.php
     * @param DateTimeInterface $datetime2 <p>The date to compare to.</p>
     * @param bool $absolute <p>Should the interval be forced to be positive?</p>
     * @return DateInterval
     * The http://www.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
     * difference between the two dates or <b>FALSE</b> on failure.
     *
     */
    public function diff($datetime2, $absolute = false);

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns date formatted according to given format
     * @link http://www.php.net/manual/en/datetime.format.php
     * @param string $format <p>
     * Format accepted by  {@link http://www.php.net/manual/en/function.date.php date()}.
     * </p>
     * @return string
     * Returns the formatted date string on success or <b>FALSE</b> on failure.
     *
     */
    public function format($format);

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the timezone offset
     * @return int
     * Returns the timezone offset in seconds from UTC on success
     * or <b>FALSE</b> on failure.
     *
     */
    public function getOffset();

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Gets the Unix timestamp
     * @return int
     * Returns the Unix timestamp representing the date.
     */
    public function getTimestamp();

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Return time zone relative to given DateTime
     * @link http://www.php.net/manual/en/datetime.gettimezone.php
     * @return DateTimeZone
     * Returns a {@link http://www.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
     * or <b>FALSE</b> on failure.
     */
    public function getTimezone();

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * The __wakeup handler
     * @link http://www.php.net/manual/en/datetime.wakeup.php
     * @return void Initializes a DateTime object.
     */
    public function __wakeup();
}

/**
*<div id="class.datetimeimmutable" class="reference">   <h1 class="title">The DateTimeImmutable class</h1>     <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p>     <div class="section" id="datetimeimmutable.intro">    <h2 class="title">简介</h2>    <p class="para">     This class behaves the same as <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> except it     never modifies itself but returns a new object instead.    </p>   </div>     <div class="section" id="datetimeimmutable.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">DateTimeImmutable</strong>      </span>            <span class="oointerface">implements        <span class="interfacename"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="interfacename">DateTimeInterface</a></span>      </span>      {</div>      <div class="classsynopsisinfo classsynopsisinfo_comment">// Inherited constants </div>     <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::ATOM</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sP&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::COOKIE</var>}</var>      <span class="initializer"> = &quot;l, d-M-Y H:i:s T&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::ISO8601</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sO&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC822</var>}</var>      <span class="initializer"> = &quot;D, d M y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC850</var>}</var>      <span class="initializer"> = &quot;l, d-M-y H:i:s T&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC1036</var>}</var>      <span class="initializer"> = &quot;D, d M y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC1123</var>}</var>      <span class="initializer"> = &quot;D, d M Y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC2822</var>}</var>      <span class="initializer"> = &quot;D, d M Y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC3339</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sP&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC3339_EXTENDED</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:s.vP&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RSS</var>}</var>      <span class="initializer"> = &quot;D, d M Y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::W3C</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sP&quot;</span>     ;</div>       <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span><span class="initializer"> = &quot;now&quot;</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span><span class="initializer"> = <strong><span>NULL</span></strong></span></span>   ]] )</div>      <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.add.php" class="methodname" style="color:#CC7832">add</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.createfromformat.php" class="methodname" style="color:#CC7832">createFromFormat</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.createfrommutable.php" class="methodname" style="color:#CC7832">createFromMutable</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$datetime</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.getlasterrors.php" class="methodname" style="color:#CC7832">getLastErrors</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.modify.php" class="methodname" style="color:#CC7832">modify</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$modify</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.set-state.php" class="methodname" style="color:#CC7832">__set_state</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">array</span> <span class="parameter" style="color:#2EACF9">$array</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.setdate.php" class="methodname" style="color:#CC7832">setDate</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$month</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.setisodate.php" class="methodname" style="color:#CC7832">setISODate</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$week</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span><span class="initializer"> = 1</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.settime.php" class="methodname" style="color:#CC7832">setTime</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$hour</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$minute</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$second</span><span class="initializer"> = 0</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$microseconds</span><span class="initializer"> = 0</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.settimestamp.php" class="methodname" style="color:#CC7832">setTimestamp</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$unixtimestamp</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.settimezone.php" class="methodname" style="color:#CC7832">setTimezone</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeImmutable</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimeimmutable.sub.php" class="methodname" style="color:#CC7832">sub</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>      <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateInterval</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.diff.php" class="methodname" style="color:#CC7832">diff</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime2</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">bool</span> <span class="parameter" style="color:#2EACF9">$absolute</span><span class="initializer"> = <strong><span>FALSE</span></strong></span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.format.php" class="methodname" style="color:#CC7832">format</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.getoffset.php" class="methodname" style="color:#CC7832">getOffset</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.gettimestamp.php" class="methodname" style="color:#CC7832">getTimestamp</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeZone</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.gettimezone.php" class="methodname" style="color:#CC7832">getTimezone</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.wakeup.php" class="methodname" style="color:#CC7832">__wakeup</a></span>     ( <span class="methodparam">void</span>    )</div>     }</div>     </div>   </div>                                                                                                <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link DateTimeImmutable::add} — Adds an amount of days, months, years, hours, minutes and seconds</li><li>{@link DateTimeImmutable::__construct} — Returns new DateTimeImmutable object</li><li>{@link DateTimeImmutable::createFromFormat} — Parses a time string according to a specified format</li><li>{@link DateTimeImmutable::createFromMutable} — Returns new DateTimeImmutable object encapsulating the given DateTime object</li><li>{@link DateTimeImmutable::getLastErrors} — Returns the warnings and errors</li><li>{@link DateTimeImmutable::modify} — Creates a new object with modified timestamp</li><li>{@link DateTimeImmutable::__set_state} — The __set_state handler</li><li>{@link DateTimeImmutable::setDate} — Sets the date</li><li>{@link DateTimeImmutable::setISODate} — Sets the ISO date</li><li>{@link DateTimeImmutable::setTime} — Sets the time</li><li>{@link DateTimeImmutable::setTimestamp} — Sets the date and time based on a Unix timestamp</li><li>{@link DateTimeImmutable::setTimezone} — Sets the time zone</li><li>{@link DateTimeImmutable::sub} — Subtracts an amount of days, months, years, hours, minutes and seconds</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.datetime.php">日期/时间</a></div></div>
*/
class DateTimeImmutable implements DateTimeInterface {
    /* Methods */
    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * @link http://www.php.net/manual/en/datetimeimmutable.construct.php
     * @param string $time [optional]
     * <p>A date/time string. Valid formats are explained in {@link www.php.net/manual/en/datetime.formats.php Date and Time Formats}.</p>
     * <p>
     * Enter <b>NULL</b> here to obtain the current time when using
     * the <em>$timezone</em> parameter.
     * </p>
     * @param DateTimeZone $timezone [optional] <p>
     * A {@link http://www.php.net/manual/en/class.datetimezone.php DateTimeZone} object representing the
     * timezone of <em>$time</em>.
     * </p>
     * <p>
     * If <em>$timezone</em> is omitted,
     * the current timezone will be used.
     * </p>
     * <blockquote><p><b>Note</b>:
     * </p><p>
     * The <em>$timezone</em> parameter
     * and the current timezone are ignored when the
     *<em>$time</em> parameter either
     * is a UNIX timestamp (e.g. <em>@946684800</em>)
     * or specifies a timezone
     * (e.g. <em>2010-01-28T15:00:00+02:00</em>).
     * </p> <p></p></blockquote>
     * @return DateTimeImmutable Returns a new DateTimeImmutable instance. Procedural style returns FALSE on failure.
     * @throws Exception Emits Exception in case of an error.
     */
    public function __construct($time = "now", $timezone = NULL) { }

/**
*<div id="datetimeimmutable.add" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::add</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::add</span> &mdash; <span class="dc-title">    Adds an amount of days, months, years, hours, minutes and seconds   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.add-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::add</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::add()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static*/
    public function add(DateInterval $interval) { }

/**
*<div id="datetimeimmutable.createfromformat" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::createFromFormat</h1>   <h1 class="refname">date_create_immutable_from_format</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::createFromFormat</span> -- <span class="refname">date_create_immutable_from_format</span> &mdash; <span class="dc-title">Parses a time string according to a specified format</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.createfromformat-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::createFromFormat</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>   ] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832">{@link date_create_immutable_from_format}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>   ] )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::createFromFormat()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return DateTimeImmutable|boolean*/
    public static function createFromFormat($format, $time, DateTimeZone $timezone = null) { }

/**
*<div id="datetimeimmutable.createfrommutable" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::createFromMutable</h1>   <p class="verinfo">(PHP 5 &gt;= 5.6.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::createFromMutable</span> &mdash; <span class="dc-title">Returns new DateTimeImmutable object encapsulating the given DateTime object</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.createfrommutable-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::createFromMutable</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$datetime</span></span>    )</div>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimeimmutable.createfrommutable-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">datetime</span></dt>       <dd>        <p class="para">        The mutable <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> object that you want to        convert to an immutable version. This object is not modified, but        instead a new <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a> object is        created containing the same date time and timezone information.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetimeimmutable.createfrommutable-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2672">     <p><strong>Example #1 Creating an immutable date time object</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"2014-06-20&nbsp;11:45&nbsp;Europe/London"</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$immutable&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTimeImmutable</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromMutable</span><span style="color: #007700">(&nbsp;</span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimeimmutable.createfrommutable-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns a new <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a> instance.   </p>  </div>  <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return DateTimeImmutable returns a new DateTimeImmutable instance.*/
    public static function createFromMutable(DateTime $dateTime) { }

/**
*<div id="datetimeimmutable.getlasterrors" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::getLastErrors</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::getLastErrors</span> &mdash; <span class="dc-title">Returns the warnings and errors</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.getlasterrors-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::getLastErrors</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::getLastErrors()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return array Returns array containing info about warnings and errors.*/
    public static function getLastErrors() { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Alters the timestamp
     * @link http://www.php.net/manual/en/datetimeimmutable.modify.php
     * @param string $modify  <p>A date/time string. Valid formats are explained in
     * {@link http://www.php.net/manual/en/datetime.formats.php Date and Time Formats}.</p>
     * @return static
     * Returns the {@link http://www.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object for method chaining or <b>FALSE</b> on failure.
     */

/**
*<div id="datetimeimmutable.modify" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::modify</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::modify</span> &mdash; <span class="dc-title">Creates a new object with modified timestamp</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.modify-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::modify</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$modify</span></span>    )</div>    <p class="para rdfs-comment">    Creates a new <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> object with modified timestamp.    The original object is not modified.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimeimmutable.modify-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">modify</span></dt>      <dd>       <p class="para">日期/时间字符串。正确格式的说明详见 <a href="http://php.net/manual/zh/datetime.formats.php" class="link">日期与时间格式</a>。</p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimeimmutable.modify-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns the newly created object 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
*/
    public function modify($modify) { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * The __set_state handler
     * @link http://www.php.net/manual/en/datetimeimmutable.set-state.php
     * @param array $array <p>Initialization array.</p>
     * @return DateTimeImmutable
     * Returns a new instance of a {@link http://www.php.net/manual/en/class.datetimeimmutable.php DateTimeImmutable} object.
     */
    public static function __set_state(array $array) { }

/**
*<div id="datetimeimmutable.setdate" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::setDate</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::setDate</span> &mdash; <span class="dc-title">Sets the date</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.setdate-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::setDate</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$month</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span></span>    )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::setDate()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static|bool*/
    public function setDate($year, $month, $day) { }

/**
*<div id="datetimeimmutable.setisodate" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::setISODate</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::setISODate</span> &mdash; <span class="dc-title">Sets the ISO date</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.setisodate-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::setISODate</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$week</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span><span class="initializer"> = 1</span></span>   ] )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::setISODate()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static|bool*/
    public function setISODate($year, $week, $day = 1) { }

/**
*<div id="datetimeimmutable.settime" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::setTime</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::setTime</span> &mdash; <span class="dc-title">Sets the time</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.settime-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::setTime</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$hour</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$minute</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$second</span><span class="initializer"> = 0</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$microseconds</span><span class="initializer"> = 0</span></span>   ]] )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::setTime()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static|false*/
    public function setTime($hour, $minute, $second = 0, $microseconds = 0) { }

/**
*<div id="datetimeimmutable.settimestamp" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::setTimestamp</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::setTimestamp</span> &mdash; <span class="dc-title">Sets the date and time based on a Unix timestamp</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.settimestamp-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::setTimestamp</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$unixtimestamp</span></span>    )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::setTimestamp()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static|bool*/
    public function setTimestamp($unixtimestamp) { }

/**
*<div id="datetimeimmutable.settimezone" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::setTimezone</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::setTimezone</span> &mdash; <span class="dc-title">Sets the time zone</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.settimezone-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::setTimezone</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>    )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::setTimezone()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static|bool*/
    public function setTimezone(DateTimeZone $timezone) { }

/**
*<div id="datetimeimmutable.sub" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeImmutable::sub</h1>   <p class="verinfo">(PHP 5 &gt;= 5.5.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeImmutable::sub</span> &mdash; <span class="dc-title">    Subtracts an amount of days, months, years, hours, minutes and seconds   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimeimmutable.sub-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="type DateTimeImmutable" style="color:#EAB766">DateTimeImmutable</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::sub</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>    <p class="para rdfs-comment">    Like <span class="methodname" style="color:#CC7832">{@link DateTime::sub()}</span> but works with    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a>.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeimmutable.php">DateTimeImmutable</a></div></div>
     * @return static|bool*/
    public function sub(DateInterval $interval) { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the difference between two DateTime objects
     * @link http://www.php.net/manual/en/datetime.diff.php
     * @param DateTimeInterface $datetime2 <p>The date to compare to.</p>
     * @param bool $absolute [optional] <p>Should the interval be forced to be positive?</p>
     * @return DateInterval
     * The {@link http://www.php.net/manual/en/class.dateinterval.php DateInterval} object representing the
     * difference between the two dates or <b>FALSE</b> on failure.
     */
    public function diff($datetime2, $absolute = false) { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns date formatted according to given format
     * @link http://www.php.net/manual/en/datetime.format.php
     * @param string $format <p>
     * Format accepted by  {@link http://www.php.net/manual/en/function.date.php date()}.
     * </p>
     * @return string
     * Returns the formatted date string on success or <b>FALSE</b> on failure.
     *
     */
    public function format($format) { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Returns the timezone offset
     * @return int
     * Returns the timezone offset in seconds from UTC on success
     * or <b>FALSE</b> on failure.
     *
     */
    public function getOffset() { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Gets the Unix timestamp
     * @return int
     * Returns the Unix timestamp representing the date.
     */
    public function getTimestamp() { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * Return time zone relative to given DateTime
     * @link http://www.php.net/manual/en/datetime.gettimezone.php
     * @return DateTimeZone
     * Returns a {@link http://www.php.net/manual/en/class.datetimezone.php DateTimeZone} object on success
     * or <b>FALSE</b> on failure.
     */
    public function getTimezone() { }

    /**
     * (PHP 5 &gt;=5.5.0)<br/>
     * The __wakeup handler
     * @link http://www.php.net/manual/en/datetime.wakeup.php
     * @return void Initializes a DateTime object.
     */
    public function __wakeup() { }
}


/**
*<div id="class.datetime" class="reference">   <h1 class="title">DateTime 类</h1>     <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p>      <div class="section" id="datetime.intro">    <h2 class="title">简介</h2>    <p class="para">     日期和时间。    </p>   </div>     <div class="section" id="datetime.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">DateTime</strong>      </span>      <span class="oointerface">implements        <span class="interfacename"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="interfacename">DateTimeInterface</a></span>      </span>      {</div>       <div class="classsynopsisinfo classsynopsisinfo_comment">// Inherited constants </div>     <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::ATOM</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sP&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::COOKIE</var>}</var>      <span class="initializer"> = &quot;l, d-M-Y H:i:s T&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::ISO8601</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sO&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC822</var>}</var>      <span class="initializer"> = &quot;D, d M y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC850</var>}</var>      <span class="initializer"> = &quot;l, d-M-y H:i:s T&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC1036</var>}</var>      <span class="initializer"> = &quot;D, d M y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC1123</var>}</var>      <span class="initializer"> = &quot;D, d M Y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC2822</var>}</var>      <span class="initializer"> = &quot;D, d M Y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC3339</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sP&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RFC3339_EXTENDED</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:s.vP&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::RSS</var>}</var>      <span class="initializer"> = &quot;D, d M Y H:i:s O&quot;</span>     ;</div> <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">string</span>       <var class="fieldsynopsis_varname">{@link <var class="varname">DateTimeInterface::W3C</var>}</var>      <span class="initializer"> = &quot;Y-m-d\TH:i:sP&quot;</span>     ;</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span><span class="initializer"> = &quot;now&quot;</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span><span class="initializer"> = <strong><span>NULL</span></strong></span></span>   ]] )</div>           <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.add.php" class="methodname" style="color:#CC7832">add</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.createfromformat.php" class="methodname" style="color:#CC7832">createFromFormat</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.getlasterrors.php" class="methodname" style="color:#CC7832">getLastErrors</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.modify.php" class="methodname" style="color:#CC7832">modify</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$modify</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.set-state.php" class="methodname" style="color:#CC7832">__set_state</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">array</span> <span class="parameter" style="color:#2EACF9">$array</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.setdate.php" class="methodname" style="color:#CC7832">setDate</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$month</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.setisodate.php" class="methodname" style="color:#CC7832">setISODate</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$week</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span><span class="initializer"> = 1</span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.settime.php" class="methodname" style="color:#CC7832">setTime</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$hour</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$minute</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$second</span><span class="initializer"> = 0</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$microseconds</span><span class="initializer"> = 0</span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.settimestamp.php" class="methodname" style="color:#CC7832">setTimestamp</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$unixtimestamp</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.settimezone.php" class="methodname" style="color:#CC7832">setTimezone</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTime</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.sub.php" class="methodname" style="color:#CC7832">sub</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>           <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateInterval</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.diff.php" class="methodname" style="color:#CC7832">diff</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime2</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">bool</span> <span class="parameter" style="color:#2EACF9">$absolute</span><span class="initializer"> = <strong><span>FALSE</span></strong></span></span>   ] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.format.php" class="methodname" style="color:#CC7832">format</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.getoffset.php" class="methodname" style="color:#CC7832">getOffset</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.gettimestamp.php" class="methodname" style="color:#CC7832">getTimestamp</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeZone</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.gettimezone.php" class="methodname" style="color:#CC7832">getTimezone</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetime.wakeup.php" class="methodname" style="color:#CC7832">__wakeup</a></span>     ( <span class="methodparam">void</span>    )</div>      }</div>     </div>   <div class="section" id="datetime.changelog">   <h2 class="title">更新日志</h2>   <p class="para">    <table class="doctable informaltable">           <thead>       <tr>        <th>版本</th>        <th>说明</th>       </tr>       </thead>       <tbody class="tbody">       <tr>        <td>7.2.0</td>        <td>         <strong class="classname">DateTime</strong> 的类常量现在定义在 <a href="http://php.net/manual/zh/class.datetimeinterface.php" class="classname">DateTimeInterface</a> 上。        </td>       </tr>        <tr>        <td>7.0.0</td>        <td>         新增常量：<a href="http://php.net/manual/zh/class.datetimeinterface.php#datetime.constants.rfc3339_extended" class="link">DATE_RFC3339_EXTENDED</a> 和         {@link DateTime::RFC3339_EXTENDED}。        </td>       </tr>        <tr>        <td>5.5.0</td>        <td>         实现 <a href="http://php.net/manual/zh/class.datetimeinterface.php" class="classname">DateTimeInterface</a> 接口。        </td>       </tr>        <tr>        <td>5.4.24</td>        <td>         COOKIE 格式从 2 位数字表示年份（RFC 850）         修改为 4 位数字表示年份（RFC 1036）。        </td>       </tr>        <tr>        <td>5.2.2</td>        <td>         DateTime 对象进行比较操作（<a href="http://php.net/manual/zh/language.operators.comparison.php" class="link">comparison operators</a>）的时候         可以正常工作了。         在之前的版本中，当使用 <em>==</em> 进行相等比较的时候，         所有的 DateTime 对象都会被视为是相等的。        </td>       </tr>       </tbody>         </table>    </p>  </div>    </div>                                                                                                                 <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link DateTime::add} — 给一个 DateTime 对象增加一定量的天，月，年，小时，分钟    以及秒。</li><li>{@link DateTime::__construct} — 返回一个新的 DateTime 对象</li><li>{@link DateTime::createFromFormat} — 根据给定的格式解析日期时间字符串</li><li>{@link DateTime::getLastErrors} — 获取警告和错误信息</li><li>{@link DateTime::modify} — 修改日期时间对象的值</li><li>{@link DateTime::__set_state} — __set_state 魔术方法处理函数</li><li>{@link DateTime::setDate} — 设置 DateTime 对象的日期</li><li>{@link DateTime::setISODate} — 设置 ISO 日期</li><li>{@link DateTime::setTime} — 设置 DateTime 对象的时间</li><li>{@link DateTime::setTimestamp} — 以 Unix 时间戳的方式设置 DateTime 对象</li><li>{@link DateTime::setTimezone} — 设置 DateTime 对象的时区</li><li>{@link DateTime::sub} — 对一个 DateTime 对象减去一定量的    日、月、年、小时、分钟和秒。</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.datetime.php">日期/时间</a></div></div>
*/
class DateTime implements DateTimeInterface {
    /**
     * @param string $time
     * @param DateTimeZone $timezone
     * @return DateTime
     * @link http://php.net/manual/en/datetime.construct.php
     */
    public function __construct ($time='now', DateTimeZone $timezone=null) {}

    /**
     * @return void
     * @link http://php.net/manual/en/datetime.wakeup.php
     */
    public function __wakeup () {}


/**
*<div id="datetime.format" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::format</h1>   <h1 class="refname">DateTimeImmutable::format</h1>   <h1 class="refname">DateTimeInterface::format</h1>   <h1 class="refname">date_format</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.1, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::format</span> -- <span class="refname">DateTimeImmutable::format</span> -- <span class="refname">DateTimeInterface::format</span> -- <span class="refname">date_format</span> &mdash; <span class="dc-title">Returns date formatted according to given format</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.format-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>DateTime::format</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::format</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeInterface::format</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832">{@link date_format}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div>    <p class="para rdfs-comment">    Returns date formatted according to given format.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.format-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅为过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">format</span></dt>      <dd>       <p class="para">       Format accepted by <span class="function">{@link date()}</span>.      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.format-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns the formatted date string on success 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.format-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2675">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::format()</strong></span> example</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2000-01-01 00:00:00 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 notes" id="refsect1-datetime.format-notes">   <h3 class="title">注释</h3>   <p class="para">    This method does not use locales. All output is in English.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.format-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link date()} - 格式化一个本地时间／日期</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeinterface.php">DateTimeInterface</a></div></div>
     * @return string*/
    public function format ($format) {}

/**
*<div id="datetime.modify" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::modify</h1>   <h1 class="refname">date_modify</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::modify</span> -- <span class="refname">date_modify</span> &mdash; <span class="dc-title">修改日期时间对象的值</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.modify-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::modify</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$modify</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_modify}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$modify</span></span>    )</div>    <p class="para rdfs-comment">    修改一个日期时间对象的值。    支持 <span class="function">{@link strtotime()}</span> 函数所允许的字符串。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.modify-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">modify</span></dt>      <dd>       <p class="para">日期/时间字符串。正确格式的说明详见 <a href="http://php.net/manual/zh/datetime.formats.php" class="link">日期与时间格式</a>。</p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.modify-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetime.modify-changelog">   <h3 class="title">更新日志</h3>   <table class="doctable informaltable">         <thead>      <tr>       <th>版本</th>       <th>说明</th>      </tr>      </thead>      <tbody class="tbody">      <tr>       <td>5.3.6</td>       <td>        支持绝对的日期时间作为变化量，        在之前的版本中，仅支持相对变化量。       </td>      </tr>       <tr><td>5.3.0</td><td>将返回值从<strong><span>NULL</span></strong>改为 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型。</td></tr>      </tbody>       </table>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.modify-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2657">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::modify()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2006-12-12'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">modify</span><span style="color: #007700">(</span><span style="color: #DD0000">'+1&nbsp;day'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2006-12-12'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">date_modify</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'+1&nbsp;day'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2006-12-13 </span></div>    </div>   </div>   <div class="example" id="example-2658">    <p><strong>Example #2 增加或者减少月份的时候需要注意</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-12-31'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">modify</span><span style="color: #007700">(</span><span style="color: #DD0000">'+1&nbsp;month'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">modify</span><span style="color: #007700">(</span><span style="color: #DD0000">'+1&nbsp;month'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-01-31 2001-03-03 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.modify-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link strtotime()} - 将任何字符串的日期时间描述解析为 Unix 时间戳</span></li>    <li class="member"><span class="function">{@link DateTime::add()} - 给一个 DateTime 对象增加一定量的天，月，年，小时，分钟    以及秒。</span></li>    <li class="member"><span class="function">{@link DateTime::sub()} - 对一个 DateTime 对象减去一定量的    日、月、年、小时、分钟和秒。</span></li>    <li class="member"><span class="function">{@link DateTime::setDate()} - 设置 DateTime 对象的日期</span></li>    <li class="member"><span class="function">{@link DateTime::setISODate()} - 设置 ISO 日期</span></li>    <li class="member"><span class="function">{@link DateTime::setTime()} - 设置 DateTime 对象的时间</span></li>    <li class="member"><span class="function">{@link DateTime::setTimestamp()} - 以 Unix 时间戳的方式设置 DateTime 对象</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static Returns the DateTime object for method chaining or FALSE on failure.*/
    public function modify ($modify) {}

/**
*<div id="datetime.add" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::add</h1>   <h1 class="refname">date_add</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::add</span> -- <span class="refname">date_add</span> &mdash; <span class="dc-title">    给一个 DateTime 对象增加一定量的天，月，年，小时，分钟    以及秒。   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.add-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::add</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_add}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>    <p class="para rdfs-comment">    将给定的 <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> 对象    加到 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 对象上。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.add-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt>       <span class="parameter" style="color:#2EACF9">interval</span>     </dt>      <dd>       <p class="para">       <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> 对象。      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.add-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.add-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2648">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::add()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">add</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P10D'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">date_add</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">date_interval_create_from_date_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'10&nbsp;days'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2000-01-11 </span></div>    </div>   </div>   <div class="example" id="example-2649">    <p><strong>Example #2 Further <span class="function"><strong style="color:#CC7832">DateTime::add()</strong></span> 例程</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">add</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'PT10H30S'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">add</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P7Y5M4DT4H3M2S'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2000-01-01 10:00:30 2007-06-05 04:03:02 </span></div>    </div>   </div>   <div class="example" id="example-2650">    <p><strong>Example #3 当在 DateTime 上加月的时候要注意</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-12-31'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$interval&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1M'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">add</span><span style="color: #007700">(</span><span style="color: #9876AA">$interval</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">add</span><span style="color: #007700">(</span><span style="color: #9876AA">$interval</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-01-31 2001-03-03 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 notes" id="refsect1-datetime.add-notes">   <h3 class="title">注释</h3>   <p class="para">    在 PHP 5.2 的版本中，    也可以使用 <span class="function">{@link DateTime::modify()}</span> 方法来替代本方法。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.add-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::sub()} - 对一个 DateTime 对象减去一定量的    日、月、年、小时、分钟和秒。</span></li>    <li class="member"><span class="function">{@link DateTime::diff()} - Returns the difference between two DateTime objects</span></li>    <li class="member"><span class="function">{@link DateTime::modify()} - 修改日期时间对象的值</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static*/
    public function add (DateInterval $interval) {}

/**
*<div id="datetime.sub" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::sub</h1>   <h1 class="refname">date_sub</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::sub</span> -- <span class="refname">date_sub</span> &mdash; <span class="dc-title">    对一个 DateTime 对象减去一定量的    日、月、年、小时、分钟和秒。   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.sub-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::sub</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_sub}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    )</div>    <p class="para rdfs-comment">    <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> 对象，    表示要减去多少量的时间。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.sub-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt>       <span class="parameter" style="color:#2EACF9">interval</span>     </dt>      <dd>       <p class="para">       <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> 对象      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.sub-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.sub-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2669">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::sub()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-20'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sub</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P10D'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-20'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">date_sub</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">date_interval_create_from_date_string</span><span style="color: #007700">(</span><span style="color: #DD0000">'10&nbsp;days'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2000-01-10 </span></div>    </div>   </div>   <div class="example" id="example-2670">    <p><strong>Example #2 Further <span class="function"><strong style="color:#CC7832">DateTime::sub()</strong></span> 例程</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-20'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sub</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'PT10H30S'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-20'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sub</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P7Y5M4DT4H3M2S'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2000-01-19 13:59:30 1992-08-15 19:56:58 </span></div>    </div>   </div>   <div class="example" id="example-2671">    <p><strong>Example #3 减去一定量的月份的时候需要注意</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2001-04-30'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$interval&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1M'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sub</span><span style="color: #007700">(</span><span style="color: #9876AA">$interval</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">sub</span><span style="color: #007700">(</span><span style="color: #9876AA">$interval</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-03-30 2001-03-02 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 notes" id="refsect1-datetime.sub-notes">   <h3 class="title">注释</h3>   <p class="para">    在 PHP 5.2 之后，可以使用 <span class="function">{@link DateTime::modify()}</span>    作为替代。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.sub-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::add()} - 给一个 DateTime 对象增加一定量的天，月，年，小时，分钟    以及秒。</span></li>    <li class="member"><span class="function">{@link DateTime::diff()} - Returns the difference between two DateTime objects</span></li>    <li class="member"><span class="function">{@link DateTime::modify()} - 修改日期时间对象的值</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static*/
    public function sub (DateInterval $interval) {}

/**
*<div id="datetime.gettimezone" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::getTimezone</h1>   <h1 class="refname">DateTimeImmutable::getTimezone</h1>   <h1 class="refname">DateTimeInterface::getTimezone</h1>   <h1 class="refname">date_timezone_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.1, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::getTimezone</span> -- <span class="refname">DateTimeImmutable::getTimezone</span> -- <span class="refname">DateTimeInterface::getTimezone</span> -- <span class="refname">date_timezone_get</span> &mdash; <span class="dc-title">Return time zone relative to given DateTime</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.gettimezone-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::getTimezone</strong></span>     ( <span class="methodparam">void</span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::getTimezone</strong></span>     ( <span class="methodparam">void</span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeInterface::getTimezone</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="methodname" style="color:#CC7832">{@link date_timezone_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    )</div>    <p class="para rdfs-comment">    Return time zone relative to given DateTime.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.gettimezone-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅为过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。</span></dd>    </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.gettimezone-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns a <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> object on success     或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.gettimezone-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2678">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::getTimezone()</strong></span> example</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'Europe/London'</span><span style="color: #007700">));<br /></span><span style="color: #9876AA">$tz&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getTimezone</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">$tz</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getName</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #9876AA">null</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">timezone_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'Europe/London'</span><span style="color: #007700">));<br /></span><span style="color: #9876AA">$tz&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_timezone_get</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">timezone_name_get</span><span style="color: #007700">(</span><span style="color: #9876AA">$tz</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Europe/London </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.gettimezone-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::setTimezone()} - 设置 DateTime 对象的时区</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeinterface.php">DateTimeInterface</a></div></div>
     * @return DateTimeZone*/
    public function getTimezone () {}

/**
*<div id="datetime.settimezone" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::setTimezone</h1>   <h1 class="refname">date_timezone_set</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::setTimezone</span> -- <span class="refname">date_timezone_set</span> &mdash; <span class="dc-title">设置 DateTime 对象的时区</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.settimezone-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::setTimezone</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_timezone_set}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>    )</div>    <p class="para rdfs-comment">    设置 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span> 的时区。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.settimezone-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">timezone</span></dt>      <dd>       <p class="para">       <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> 对象，       表示要设置为时区。      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.settimezone-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetime.settimezone-changelog">   <h3 class="title">更新日志</h3>   <table class="doctable informaltable">         <thead>      <tr>       <th>版本</th>       <th>说明</th>      </tr>      </thead>      <tbody class="tbody">      <tr><td>5.3.0</td><td>将返回值从<strong><span>NULL</span></strong>改为 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型。</td></tr>      </tbody>       </table>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.settimezone-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2668">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::setTimeZone()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'Pacific/Nauru'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:sP'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTimezone</span><span style="color: #007700">(new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'Pacific/Chatham'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:sP'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2000-01-01'</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">timezone_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'Pacific/Nauru'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:sP'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">date_timezone_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">timezone_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'Pacific/Chatham'</span><span style="color: #007700">));<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:sP'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2000-01-01 00:00:00+12:00 2000-01-01 01:45:00+13:45 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.settimezone-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::getTimezone()} - Return time zone relative to given DateTime</span></li>    <li class="member"><span class="function">{@link DateTimeZone::__construct()} - 创建新的DateTimeZone对象</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static*/
    public function setTimezone ($timezone) {}

/**
*<div id="datetime.getoffset" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::getOffset</h1>   <h1 class="refname">DateTimeImmutable::getOffset</h1>   <h1 class="refname">DateTimeInterface::getOffset</h1>   <h1 class="refname">date_offset_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.1, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::getOffset</span> -- <span class="refname">DateTimeImmutable::getOffset</span> -- <span class="refname">DateTimeInterface::getOffset</span> -- <span class="refname">date_offset_get</span> &mdash; <span class="dc-title">Returns the timezone offset</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.getoffset-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTime::getOffset</strong></span>     ( <span class="methodparam">void</span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::getOffset</strong></span>     ( <span class="methodparam">void</span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeInterface::getOffset</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832">{@link date_offset_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    )</div>    <p class="para rdfs-comment">    Returns the timezone offset.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.getoffset-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅为过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。</span></dd>    </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.getoffset-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns the timezone offset in seconds from UTC on success     或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.getoffset-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2676">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::getOffset()</strong></span> example</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$winter&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2010-12-21'</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'America/New_York'</span><span style="color: #007700">));<br /></span><span style="color: #9876AA">$summer&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2008-06-21'</span><span style="color: #007700">,&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">'America/New_York'</span><span style="color: #007700">));<br /><br />echo&nbsp;</span><span style="color: #9876AA">$winter</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getOffset</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #9876AA">$summer</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getOffset</span><span style="color: #007700">()&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$winter&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2010-12-21'</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">timezone_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'America/New_York'</span><span style="color: #007700">));<br /></span><span style="color: #9876AA">$summer&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2008-06-21'</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">timezone_open</span><span style="color: #007700">(</span><span style="color: #DD0000">'America/New_York'</span><span style="color: #007700">));<br /><br />echo&nbsp;</span><span style="color: #9876AA">date_offset_get</span><span style="color: #007700">(</span><span style="color: #9876AA">$winter</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br />echo&nbsp;</span><span style="color: #9876AA">date_offset_get</span><span style="color: #007700">(</span><span style="color: #9876AA">$summer</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> -18000 -14400 </span></div>    </div>    <div class="example-contents"><p>     Note: -18000 = -5 hours, -14400 = -4 hours.    </p></div>   </div>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeinterface.php">DateTimeInterface</a></div></div>
     * @return int*/
    public function getOffset () {}

/**
*<div id="datetime.settime" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::setTime</h1>   <h1 class="refname">date_time_set</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::setTime</span> -- <span class="refname">date_time_set</span> &mdash; <span class="dc-title">设置 DateTime 对象的时间</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.settime-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::setTime</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$hour</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$minute</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$second</span><span class="initializer"> = 0</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$microseconds</span><span class="initializer"> = 0</span></span>   ]] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_time_set}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$hour</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$minute</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$second</span><span class="initializer"> = 0</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$microseconds</span><span class="initializer"> = 0</span></span>   ]] )</div>    <p class="para rdfs-comment">    设置 DateTime 对象的时间。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.settime-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">hour</span></dt>      <dd>       <p class="para">       小时。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">minute</span></dt>      <dd>       <p class="para">       分钟。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">second</span></dt>      <dd>       <p class="para">       秒。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">microseconds</span></dt>      <dd>       <p class="para">       微秒。      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.settime-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetime.settime-changelog">   <h3 class="title">更新日志</h3>   <table class="doctable informaltable">         <thead>      <tr>       <th>版本</th>       <th>说明</th>      </tr>      </thead>      <tbody class="tbody">      <tr>       <td>7.1.0</td>       <td>新增 <span class="parameter" style="color:#2EACF9">microseconds</span> 参数。</td>      </tr>       <tr><td>5.3.0</td><td>将返回值从<strong><span>NULL</span></strong>改为 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型。</td></tr>      </tbody>       </table>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.settime-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2664">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::setTime()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2001-01-01'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTime</span><span style="color: #007700">(</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTime</span><span style="color: #007700">(</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">24</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2001-01-01'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">date_time_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">date_time_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">24</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-01-01 14:55:00 2001-01-01 14:55:24 </span></div>    </div>   </div>   <div class="example" id="example-2665">    <p><strong>Example #2 超出有效范围的部分会增加到上一级</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2001-01-01'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTime</span><span style="color: #007700">(</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">24</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTime</span><span style="color: #007700">(</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">65</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTime</span><span style="color: #007700">(</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">65</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">24</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTime</span><span style="color: #007700">(</span><span style="color: #9876AA">25</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">55</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">24</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-01-01 14:55:24 2001-01-01 14:56:05 2001-01-01 15:05:24 2001-01-02 01:55:24 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.settime-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::setDate()} - 设置 DateTime 对象的日期</span></li>    <li class="member"><span class="function">{@link DateTime::setISODate()} - 设置 ISO 日期</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static|false*/
    public function setTime ($hour, $minute, $second=0, $microseconds=0) {}

/**
*<div id="datetime.setdate" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::setDate</h1>   <h1 class="refname">date_date_set</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::setDate</span> -- <span class="refname">date_date_set</span> &mdash; <span class="dc-title">设置 DateTime 对象的日期</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.setdate-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::setDate</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$month</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_date_set}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$month</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span></span>    )</div>    <p class="para rdfs-comment">    设置 DateTime 对象的日期。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.setdate-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">year</span></dt>      <dd>       <p class="para">       年份。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">month</span></dt>      <dd>       <p class="para">       月份。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">day</span></dt>      <dd>       <p class="para">       日。      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.setdate-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetime.setdate-changelog">   <h3 class="title">更新日志</h3>   <table class="doctable informaltable">         <thead>      <tr>       <th>版本</th>       <th>说明</th>      </tr>      </thead>      <tbody class="tbody">      <tr><td>5.3.0</td><td>将返回值从<strong><span>NULL</span></strong>改为 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型。</td></tr>      </tbody>       </table>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.setdate-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2659">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::setDate()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setDate</span><span style="color: #007700">(</span><span style="color: #9876AA">2001</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">3</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">date_date_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2001</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">3</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-02-03 </span></div>    </div>   </div>   <div class="example" id="example-2660">    <p><strong>Example #2 超出范围的部分会向上一级增加</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setDate</span><span style="color: #007700">(</span><span style="color: #9876AA">2001</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">28</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setDate</span><span style="color: #007700">(</span><span style="color: #9876AA">2001</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">29</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setDate</span><span style="color: #007700">(</span><span style="color: #9876AA">2001</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">14</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">3</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2001-02-28 2001-03-01 2002-02-03 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.setdate-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::setISODate()} - 设置 ISO 日期</span></li>    <li class="member"><span class="function">{@link DateTime::setTime()} - 设置 DateTime 对象的时间</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static*/
    public function setDate ($year, $month, $day) {}

/**
*<div id="datetime.setisodate" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::setISODate</h1>   <h1 class="refname">date_isodate_set</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::setISODate</span> -- <span class="refname">date_isodate_set</span> &mdash; <span class="dc-title">设置 ISO 日期</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.setisodate-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::setISODate</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$week</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span><span class="initializer"> = 1</span></span>   ] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_isodate_set}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$year</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$week</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$day</span><span class="initializer"> = 1</span></span>   ] )</div>    <p class="para rdfs-comment">    以 ISO 8601 规范的格式设置日期，    使用周和日的偏移量作为参数，而不是使用月和日。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.setisodate-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">year</span></dt>      <dd>       <p class="para">       年份。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">week</span></dt>      <dd>       <p class="para">       周。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">day</span></dt>      <dd>       <p class="para">       从周的第一天计算，日在一周内的偏移量。      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.setisodate-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetime.setisodate-changelog">   <h3 class="title">更新日志</h3>   <table class="doctable informaltable">         <thead>      <tr>       <th>版本</th>       <th>说明</th>      </tr>      </thead>      <tbody class="tbody">      <tr><td>5.3.0</td><td>将返回值从<strong><span>NULL</span></strong>改为 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型。</td></tr>      </tbody>       </table>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.setisodate-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2661">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::setISODate()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setISODate</span><span style="color: #007700">(</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setISODate</span><span style="color: #007700">(</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">7</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">();<br /><br /></span><span style="color: #9876AA">date_isodate_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">date_isodate_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">7</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2008-01-07 2008-01-13 </span></div>    </div>   </div>   <div class="example" id="example-2662">    <p><strong>Example #2 超出有效范围的部分，会加到上一级</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setISODate</span><span style="color: #007700">(</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">7</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setISODate</span><span style="color: #007700">(</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">2</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">8</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setISODate</span><span style="color: #007700">(</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">53</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">7</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2008-01-13 2008-01-14 2009-01-04 </span></div>    </div>   </div>   <div class="example" id="example-2663">    <p><strong>Example #3 找出来某个周所属的月份</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setISODate</span><span style="color: #007700">(</span><span style="color: #9876AA">2008</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">14</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'n'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 3 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.setisodate-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::setDate()} - 设置 DateTime 对象的日期</span></li>    <li class="member"><span class="function">{@link DateTime::setTime()} - 设置 DateTime 对象的时间</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static*/
    public function setISODate ($year, $week, $day=1) {}

/**
*<div id="datetime.settimestamp" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::setTimestamp</h1>   <h1 class="refname">date_timestamp_set</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::setTimestamp</span> -- <span class="refname">date_timestamp_set</span> &mdash; <span class="dc-title">以 Unix 时间戳的方式设置 DateTime 对象</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.settimestamp-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::setTimestamp</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$unixtimestamp</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_timestamp_set}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$unixtimestamp</span></span>    )</div>    <p class="para rdfs-comment">    以 Unix 时间戳的方式设置 DateTime 对象的日期和时间。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.settimestamp-parameters">   <h3 class="title">参数</h3>   <dl>     <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>  <dd> <span>仅过程化风格：由 <span class="function">{@link date_create()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类型的对象。此函数会修改这个对象。</span></dd>          <dt> <span class="parameter" style="color:#2EACF9">unixtimestamp</span></dt>      <dd>       <p class="para">       表示日期时间的 Unix 时间戳。      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.settimestamp-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回被修改的 DateTime 对象， 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.settimestamp-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2666">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::setTimestamp()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'U&nbsp;=&nbsp;Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">setTimestamp</span><span style="color: #007700">(</span><span style="color: #9876AA">1171502725</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'U&nbsp;=&nbsp;Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'U&nbsp;=&nbsp;Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">date_timestamp_set</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">1171502725</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'U&nbsp;=&nbsp;Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 1272508903 = 2010-04-28 22:41:43 1171502725 = 2007-02-14 20:25:25 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 notes" id="refsect1-datetime.settimestamp-notes">   <h3 class="title">注释</h3>   <p class="para">    PHP 5.2 之后的版本中，    可以使用 Unix 时间戳作为构造函数的参数生成新的 <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> 对象，例如：   </p>   <div class="example" id="example-2667">    <p><strong>Example #2      PHP 5.2 之后的版本中，<span class="function"><strong style="color:#CC7832">DateTime::setTimestamp()</strong></span> 替代方案    </strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$ts&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">1171502725</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"@</span><span style="color: #9876AA">$ts</span><span style="color: #DD0000">"</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'U&nbsp;=&nbsp;Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 1171502725 = 2007-02-14 20:25:25 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.settimestamp-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::getTimestamp()} - Gets the Unix timestamp</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return static*/
    public function setTimestamp ($unixtimestamp) {}

/**
*<div id="datetime.gettimestamp" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::getTimestamp</h1>   <h1 class="refname">DateTimeImmutable::getTimestamp</h1>   <h1 class="refname">DateTimeInterface::getTimestamp</h1>   <h1 class="refname">date_timestamp_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::getTimestamp</span> -- <span class="refname">DateTimeImmutable::getTimestamp</span> -- <span class="refname">DateTimeInterface::getTimestamp</span> -- <span class="refname">date_timestamp_get</span> &mdash; <span class="dc-title">Gets the Unix timestamp</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.gettimestamp-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTime::getTimestamp</strong></span>     ( <span class="methodparam">void</span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::getTimestamp</strong></span>     ( <span class="methodparam">void</span>    )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeInterface::getTimestamp</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832">{@link date_timestamp_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    )</div>    <p class="para rdfs-comment">    Gets the Unix timestamp.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.gettimestamp-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.gettimestamp-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns the Unix timestamp representing the date.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.gettimestamp-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2677">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::getTimestamp()</strong></span> example</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getTimestamp</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">date_timestamp_get</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 1272509157 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 notes" id="refsect1-datetime.gettimestamp-notes">   <h3 class="title">注释</h3>   <p class="para">    Using <em>U</em> as the parameter to    <span class="function">{@link DateTime::format()}</span>    is an alternative when using PHP 5.2.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.gettimestamp-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::setTimestamp()} - 以 Unix 时间戳的方式设置 DateTime 对象</span></li>    <li class="member"><span class="function">{@link DateTime::format()} - Returns date formatted according to given format</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeinterface.php">DateTimeInterface</a></div></div>
     * @return int*/
    public function getTimestamp () {}

/**
*<div id="datetime.diff" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::diff</h1>   <h1 class="refname">DateTimeImmutable::diff</h1>   <h1 class="refname">DateTimeInterface::diff</h1>   <h1 class="refname">date_diff</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::diff</span> -- <span class="refname">DateTimeImmutable::diff</span> -- <span class="refname">DateTimeInterface::diff</span> -- <span class="refname">date_diff</span> &mdash; <span class="dc-title">Returns the difference between two DateTime objects</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.diff-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::diff</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime2</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">bool</span> <span class="parameter" style="color:#2EACF9">$absolute</span><span class="initializer"> = <strong><span>FALSE</span></strong></span></span>   ] )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeImmutable::diff</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime2</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">bool</span> <span class="parameter" style="color:#2EACF9">$absolute</span><span class="initializer"> = <strong><span>FALSE</span></strong></span></span>   ] )</div>    <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTimeInterface::diff</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime2</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">bool</span> <span class="parameter" style="color:#2EACF9">$absolute</span><span class="initializer"> = <strong><span>FALSE</span></strong></span></span>   ] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="methodname" style="color:#CC7832">{@link date_diff}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime1</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$datetime2</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">bool</span> <span class="parameter" style="color:#2EACF9">$absolute</span><span class="initializer"> = <strong><span>FALSE</span></strong></span></span>   ] )</div>    <p class="para rdfs-comment">    Returns the difference between two <a href="http://php.net/manual/zh/class.datetimeinterface.php" class="classname">DateTimeInterface</a>    objects.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.diff-parameters">   <h3 class="title">参数</h3>   <dl>          <dt> <span class="parameter" style="color:#2EACF9">datetime</span></dt>      <dd>       <span>       The date to compare to.      </span>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">absolute</span></dt>      <dd>       <p class="para">       Should the interval be forced to be positive?      </p>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.diff-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    The <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> object representing the    difference between the two dates 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.diff-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2673">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::diff()</strong></span> example</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$datetime1&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2009-10-11'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$datetime2&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2009-10-13'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$interval&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$datetime1</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">diff</span><span style="color: #007700">(</span><span style="color: #9876AA">$datetime2</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%R%a&nbsp;days'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$datetime1&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2009-10-11'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$datetime2&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'2009-10-13'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$interval&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_diff</span><span style="color: #007700">(</span><span style="color: #9876AA">$datetime1</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$datetime2</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%R%a&nbsp;days'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> +2 days </span></div>    </div>   </div>   <div class="example" id="example-2674">    <p><strong>Example #2 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> object comparison</strong></p>    <blockquote class="note" style="border:1px gray solid"><p><strong class="note" style="border:1px gray solid">Note</strong>:      <span>      As of PHP 5.2.2, DateTime objects can be compared using      <a href="http://php.net/manual/zh/language.operators.comparison.php" class="link">comparison operators</a>.     </span>    </p></blockquote>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date1&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"now"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$date2&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"tomorrow"</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">var_dump</span><span style="color: #007700">(</span><span style="color: #9876AA">$date1&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #9876AA">$date2</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">var_dump</span><span style="color: #007700">(</span><span style="color: #9876AA">$date1&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #9876AA">$date2</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">var_dump</span><span style="color: #007700">(</span><span style="color: #9876AA">$date1&nbsp;</span><span style="color: #007700">&gt;&nbsp;</span><span style="color: #9876AA">$date2</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>   </div>    <div class="example-contents"><p>以上例程会输出：</p></div>   <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> bool(false) bool(true) bool(false) </span></div>   </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.diff-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateInterval::format()} - Formats the interval</span></li>    <li class="member"><span class="function">{@link DateTime::add()} - 给一个 DateTime 对象增加一定量的天，月，年，小时，分钟    以及秒。</span></li>    <li class="member"><span class="function">{@link DateTime::sub()} - 对一个 DateTime 对象减去一定量的    日、月、年、小时、分钟和秒。</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimeinterface.php">DateTimeInterface</a></div></div>
     * @return DateInterval|boolean The DateInterval object representing the difference between the two dates or FALSE on failure.*/
    public function diff ($datetime2, $absolute = false) {}


/**
*<div id="datetime.createfromformat" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::createFromFormat</h1>   <h1 class="refname">date_create_from_format</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::createFromFormat</span> -- <span class="refname">date_create_from_format</span> &mdash; <span class="dc-title">根据给定的格式解析日期时间字符串</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.createfromformat-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832"><strong>DateTime::createFromFormat</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>   ] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="methodname" style="color:#CC7832">{@link date_create_from_format}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>   ] )</div>    <p class="para rdfs-comment">    将 <span class="parameter" style="color:#2EACF9">time</span> 参数给定的日期时间字符串，    根据 <span class="parameter" style="color:#2EACF9">format</span> 参数给定的格式    解析为一个新的 DateTime 对象。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.createfromformat-parameters">   <h3 class="title">参数</h3>   <dl>          <dt> <span class="parameter" style="color:#2EACF9">format</span></dt>      <dd>       <span>       在解析日期时间字符串的时候使用的格式 <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.string.php" class="type string" style="color:#EAB766">string</a></span>。       参加下列的格式清单。       大部分格式和 <span class="function">{@link date()}</span> 函数中的格式是一致的。      </span>      <p class="para">       <table class="doctable table">        <caption><strong><span class="parameter" style="color:#2EACF9">format</span>         参数中支持的字符</strong></caption>                 <thead>          <tr>           <th><span class="parameter" style="color:#2EACF9">format</span> 中的字符</th>           <th>解释</th>           <th>示例</th>          </tr>          </thead>          <tbody class="tbody">          <tr>           <td style="text-align: center;"><em class="emphasis">日</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td><em>d</em> 和 <em>j</em></td>           <td>一个月中的第几天，2 位数字表示，有前导 0 或者无前导 0</td>           <td>            <em>01</em> 到 <em>31</em> 或者            <em>1</em> 到 <em>31</em>           </td>          </tr>           <tr>           <td><em>D</em> 和 <em>l</em></td>           <td>星期几的文字表示</td>           <td>            <em>Mon</em> 到 <em>Sun</em> 或者            <em>Sunday</em> 到 <em>Saturday</em>           </td>          </tr>           <tr>           <td><em>S</em></td>           <td>2 个字母表示的一个月中的第几天（序数词），           在进行解析的时候会被忽略</td>           <td>            <em>st</em>，<em>nd</em>，<em>rd</em> 或者            <em>th</em>。           </td>          </tr>           <tr>           <td><em>z</em></td>           <td>一年中的第几天，从 0 开始</td>           <td><em>0</em> 到 <em>365</em></td>          </tr>           <tr>           <td style="text-align: center;"><em class="emphasis">月</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td><em>F</em> 和 <em>M</em></td>           <td>文本表示的月份，例如 January 或者 Sept</td>           <td>            <em>January</em> 到 <em>December</em> 或者            <em>Jan</em> 到 <em>Dec</em>           </td>          </tr>           <tr>           <td><em>m</em> 和 <em>n</em></td>           <td>数值表示的月份，有前导 0 或者无前导 0</td>           <td>            <em>01</em> 到 <em>12</em> or            <em>1</em> 到 <em>12</em>           </td>          </tr>           <tr>           <td style="text-align: center;"><em class="emphasis">年</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td><em>Y</em></td>           <td>4 位数字表示的年</td>           <td>例如：<em>1999</em> 或 <em>2003</em></td>          </tr>           <tr>           <td><em>y</em></td>           <td>            2 位数字表示的年，            可用的范围是 1970 至 2069（不含）           </td>           <td>            例如：            <em>99</em> 或 <em>03</em>            （表示 <em>1999</em> 和            <em>2003</em>）           </td>          </tr>           <tr>           <td style="text-align: center;"><em class="emphasis">时间</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td><em>a</em> 和 <em>A</em></td>           <td>上午、下午</td>           <td><em>am</em> 或 <em>pm</em></td>          </tr>           <tr>           <td><em>g</em> and <em>h</em></td>           <td>12 小时制的小时，有前导 0 或者无前导 0</td>           <td>            <em>1</em> 到 <em>12</em> 或者            <em>01</em> 到 <em>12</em>           </td>          </tr>           <tr>           <td><em>G</em> 和 <em>H</em></td>           <td>24 小时制的小时，有前导 0 或者无前导 0</td>           <td>            <em>0</em> 到 <em>23</em> 或            <em>00</em> 到 <em>23</em>           </td>          </tr>           <tr>           <td><em>i</em></td>           <td>分钟，有前导 0</td>           <td><em>00</em> 到 <em>59</em></td>          </tr>           <tr>           <td><em>s</em></td>           <td>秒，有前导 0</td>           <td><em>00</em> 到 <em>59</em></td>          </tr>           <tr>           <td><em>u</em></td>           <td>微秒，最多到 6 位数字</td>           <td>示例：<em>45</em>，<em>654321</em></td>          </tr>           <tr>           <td style="text-align: center;"><em class="emphasis">时区</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td>            <em>e</em>，<em>O</em>,            <em>P</em> 和 <em>T</em>           </td>           <td>时区名称，或者是以 UTC 时区为基准的小时偏移量，            或者是以 UTC 为基准的小时和分钟的偏移量，            小时和分钟之间用冒号（:）分隔。            </td>           <td>示例：<em>UTC</em>，<em>GMT</em>，            <em>Atlantic/Azores</em> 或             <em>+0200</em> 或 <em>+02:00</em> 或            <em>EST</em>，<em>MDT</em>           </td>          </tr>           <tr>           <td style="text-align: center;"><em class="emphasis">完整的日期和时间</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td><em>U</em></td>           <td>从 Unix Epoch (January 1 1970 00:00:00 GMT) 开始计算的时间，以秒为单位</td>           <td>示例：<em>1292177455</em></td>          </tr>           <tr>           <td style="text-align: center;"><em class="emphasis">空白字符和分隔字符</em></td>           <td>---</td>           <td>---</td>          </tr>           <tr>           <td><em> </em> （空格）</td>           <td>一个空格字符或者一个 tab 字符</td>           <td>示例：<em> </em></td>          </tr>           <tr>           <td><em>#</em></td>           <td>            可以是一下分隔符号中的任意一个： <em>;</em>，            <em>:</em>，<em>/</em>，<em>.</em>，            <em>,</em>，<em>-</em>，<em>(</em> 或            <em>)</em>           </td>           <td>示例：<em>/</em></td>          </tr>           <tr>           <td>            <em>;</em>，            <em>:</em>，<em>/</em>，<em>.</em>，            <em>,</em>，<em>-</em>，<em>(</em> 或            <em>)</em>           </td>           <td>特殊字符</td>           <td>示例：<em>-</em></td>          </tr>           <tr>           <td><em>?</em></td>           <td>随机字节</td>           <td>示例：<em>^</em> （需要注意的是，           对于 UTF-8 字符，可能会需要多个 <em>?</em>。           这种情况下，请使用 <em>*</em>）           </td>          </tr>           <tr>           <td><em>*</em></td>           <td>随机字节，直到遇到下一个有效的分隔符号或者数值</td>           <td>示例：使用 <em>Y-*-d</em> 格式用来解析 <em>2009-aWord-08</em> 字符串的时候，           <em>*</em> 会匹配           <em>aWord</em></td>          </tr>           <tr>           <td><em>!</em></td>           <td>           将所有的字段（年、月、日、时、分、秒、微秒以及时区）重置到 Unix Epoch 时间。</td>           <td>如果不使用 <em>!,</em> 格式，            那么所有的字段会被设置为系统当前的日期和时间。</td>          </tr>           <tr>           <td><em>|</em></td>           <td>将尚未被解析的字段，也即格式字符串中未明确指定的字段            （年、月、日、时、分、秒、微秒以及时区）            重置到 Unix Epoch 时间。</td>           <td><em>Y-m-d|</em>             会解析日期时间字符串中的年、月和日，           但是对于时、分、秒字段会设置为 0.</td>          </tr>           <tr>           <td><em>+</em></td>           <td>在格式字符串中使用这个格式表示字符，           并且所提供的日期时间字符串中包含除了格式字符之外的其他数据的话，不会发出一个错误，而是发出一个警告。</td>           <td>使用 <span class="methodname" style="color:#CC7832">{@link DateTime::getLastErrors()}</span> 方法            来检测所给定的日期时间字符串中是否包含格式字符串指定的内容之外的数据。</td>          </tr>          </tbody>               </table>       </p>      <p class="para">       如果在格式字符串中包含不可识别的字符，       那么会导致解析失败，并且在返回的结构中附加一个错误信息。       可以通过 <span class="methodname" style="color:#CC7832">{@link DateTime::getLastErrors()}</span>       来探查解析是否存在错误。      </p>             <p class="para">       如果需要在格式字符串 <span class="parameter" style="color:#2EACF9">format</span> 参数中使用       上述表示格式的字符作为一个普通字符，请对其使用反斜线（<em>\</em>）进行转义。      </p>      <p class="para">       如果格式字符串参数 <span class="parameter" style="color:#2EACF9">format</span>        中不包含 <em>!</em> 字符，       那么没有在 <span class="parameter" style="color:#2EACF9">format</span> 参数中指明的字段，       在解析结果中将会被设置为系统当前时间对应的字段值。      </p>      <p class="para">       如果格式字符串参数 <span class="parameter" style="color:#2EACF9">format</span>        包含了 <em>!</em> 字符，       那么没有在 <span class="parameter" style="color:#2EACF9">format</span> 参数中指明的字段，       以及在 <em>!</em> 左侧对应的字段，       在解析结果中将会被设置为 Unix epoch 时间对应的字段。      </p>      <p class="para">       The Unix epoch 为 1970-01-01 00:00:00 UTC。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">time</span></dt>      <dd>       <p class="para">       用来表示日期时间的字符串。      </p>     </dd>              <dt> <span class="parameter" style="color:#2EACF9">timezone</span></dt>      <dd>       <p class="para">       <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> 对象，       表示在解析日期时间字符串的时候需要使用的时区。      </p>      <p class="para">       如果忽略 <span class="parameter" style="color:#2EACF9">timezone</span> 参数，       并且表示日期时间的字符串 <span class="parameter" style="color:#2EACF9">time</span> 中也不包含时区信息，       那么将会使用系统当前时区作为解析结果对象的时区。      </p>      <blockquote class="note" style="border:1px gray solid"><p><strong class="note" style="border:1px gray solid">Note</strong>:        <p class="para">        如果 <span class="parameter" style="color:#2EACF9">time</span> 参数        是 UNIX 时间戳格式（例如：<em>946684800</em>），        或者其中已经包含了时区信息（例如：<em>2010-01-28T15:00:00+02:00</em>），        那么 <span class="parameter" style="color:#2EACF9">timezone</span>         以及系统当前时区        都将会被忽略。       </p>      </p></blockquote>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.createfromformat-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回一个 DateTime 对象。 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetime.createfromformat-changelog">   <h3 class="title">更新日志</h3>   <span>    <table class="doctable informaltable">           <thead>       <tr>        <th>版本</th>        <th>说明</th>       </tr>       </thead>       <tbody class="tbody">       <tr>        <td>5.3.9</td>        <td>         新增 <span class="parameter" style="color:#2EACF9">format</span> 格式字符串中对于 + 格式字符的支持。        </td>       </tr>       </tbody>         </table>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.createfromformat-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2653">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::createFromFormat()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromFormat</span><span style="color: #007700">(</span><span style="color: #DD0000">'j-M-Y'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'15-Feb-2009'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create_from_format</span><span style="color: #007700">(</span><span style="color: #DD0000">'j-M-Y'</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'15-Feb-2009'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">date_format</span><span style="color: #007700">(</span><span style="color: #9876AA">$date</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2009-02-15 </span></div>    </div>   </div>   <div class="example" id="example-2654">    <p><strong>Example #2 <span class="function"><strong style="color:#CC7832">DateTime::createFromFormat()</strong></span> 的复杂用法</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">'Current&nbsp;time:&nbsp;'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">date</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$format&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Y-m-d'</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromFormat</span><span style="color: #007700">(</span><span style="color: #9876AA">$format</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'2009-02-15'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"Format:&nbsp;</span><span style="color: #9876AA">$format</span><span style="color: #DD0000">;&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$format&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromFormat</span><span style="color: #007700">(</span><span style="color: #9876AA">$format</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'2009-02-15&nbsp;15:16:17'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"Format:&nbsp;</span><span style="color: #9876AA">$format</span><span style="color: #DD0000">;&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$format&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'Y-m-!d&nbsp;H:i:s'</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromFormat</span><span style="color: #007700">(</span><span style="color: #9876AA">$format</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'2009-02-15&nbsp;15:16:17'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"Format:&nbsp;</span><span style="color: #9876AA">$format</span><span style="color: #DD0000">;&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #9876AA">$format&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #DD0000">'!d'</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromFormat</span><span style="color: #007700">(</span><span style="color: #9876AA">$format</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">'15'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #DD0000">"Format:&nbsp;</span><span style="color: #9876AA">$format</span><span style="color: #DD0000">;&nbsp;"&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #9876AA">$date</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'Y-m-d&nbsp;H:i:s'</span><span style="color: #007700">)&nbsp;.&nbsp;</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Current time: 2010-04-23 10:29:35 Format: Y-m-d; 2009-02-15 10:29:35 Format: Y-m-d H:i:s; 2009-02-15 15:16:17 Format: Y-m-!d H:i:s; 1970-01-15 15:16:17 Format: !d; 1970-01-15 00:00:00 </span></div>    </div>   </div>   <div class="example" id="example-2655">    <p><strong>Example #3 格式化字符串中包含了需要进行转义的字符</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromFormat</span><span style="color: #007700">(</span><span style="color: #DD0000">'H\h&nbsp;i\m&nbsp;s\s'</span><span style="color: #007700">,</span><span style="color: #DD0000">'23h&nbsp;15m&nbsp;03s'</span><span style="color: #007700">)-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'H:i:s'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程的输出类似于：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 23:15:03 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetime.createfromformat-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="function">{@link DateTime::__construct()} - 返回一个新的 DateTime 对象</span></li>    <li class="member"><span class="function">{@link DateTime::getLastErrors()} - 获取警告和错误信息</span></li>    <li class="member"><span class="function">{@link checkdate()} - 验证一个格里高里日期</span></li>    <li class="member"><span class="function">{@link strptime()} - 解析由 strftime 生成的日期／时间</span></li>   </ul>  </div>  <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return DateTime|boolean*/
    public static function createFromFormat ($format, $time, DateTimeZone $timezone=null) {}

/**
*<div id="datetime.getlasterrors" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTime::getLastErrors</h1>   <h1 class="refname">date_get_last_errors</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTime::getLastErrors</span> -- <span class="refname">date_get_last_errors</span> &mdash; <span class="dc-title">获取警告和错误信息</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetime.getlasterrors-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>DateTime::getLastErrors</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832">{@link date_get_last_errors}</span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    返回在解析日期时间字符串的过程中发生的警告和错误信息。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetime.getlasterrors-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetime.getlasterrors-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    返回一个数组，其中包含在解析日期时间字符串的过程中发生的警告和错误信息。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetime.getlasterrors-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2656">    <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTime::getLastErrors()</strong></span> 例程</strong></p>    <div class="example-contents"><p>面向对象风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /></span><span style="color: #007700">try&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">$date&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'asdfasdf'</span><span style="color: #007700">);<br />}&nbsp;catch&nbsp;(</span><span style="color: #9876AA">Exception&nbsp;$e</span><span style="color: #007700">)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;仅出于演示的目的...<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">print_r</span><span style="color: #007700">(</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">getLastErrors</span><span style="color: #007700">());<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;实际的代码中你应该这样使用返回对象<br />&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;echo&nbsp;$e-&gt;getMessage();<br /></span><span style="color: #007700">}<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>过程化风格</p></div>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$date&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">date_create</span><span style="color: #007700">(</span><span style="color: #DD0000">'asdfasdf'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">print_r</span><span style="color: #007700">(</span><span style="color: #9876AA">date_get_last_errors</span><span style="color: #007700">());<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Array (    [warning_count] =&gt; 1    [warnings] =&gt; Array        (            [6] =&gt; Double timezone specification        )     [error_count] =&gt; 1    [errors] =&gt; Array        (            [0] =&gt; The timezone could not be found in the database        )  ) </span></div>    </div>    <div class="example-contents"><p>     返回数组中的索引 6 和 0 表示在解析过程中，所提供的日期时间字符串中无法正确解析的字符位置。    </p></div>   </div>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetime.php">DateTime</a></div></div>
     * @return array*/
    public static function getLastErrors () {}

    /**
     * The __set_state handler
     * @link http://php.net/manual/en/datetime.set-state.php
     * @param array $array <p>Initialization array.</p>
     * @return DateTime <p>Returns a new instance of a DateTime object.</p>
     */
    public static function __set_state ($array) {}
}

/**
*<div id="class.datetimezone" class="reference">   <h1 class="title">The DateTimeZone class</h1>     <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p>     <div class="section" id="datetimezone.intro">    <h2 class="title">简介</h2>    <p class="para">     Representation of time zone.    </p>   </div>     <div class="section" id="datetimezone.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">DateTimeZone</strong>      </span>      {</div>      <div class="classsynopsisinfo classsynopsisinfo_comment">// 常量 </div>     <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.africa"><var class="varname">AFRICA</var></a></var>      <span class="initializer"> = 1</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.america"><var class="varname">AMERICA</var></a></var>      <span class="initializer"> = 2</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.antarctica"><var class="varname">ANTARCTICA</var></a></var>      <span class="initializer"> = 4</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.arctic"><var class="varname">ARCTIC</var></a></var>      <span class="initializer"> = 8</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.asia"><var class="varname">ASIA</var></a></var>      <span class="initializer"> = 16</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.atlantic"><var class="varname">ATLANTIC</var></a></var>      <span class="initializer"> = 32</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.australia"><var class="varname">AUSTRALIA</var></a></var>      <span class="initializer"> = 64</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.europe"><var class="varname">EUROPE</var></a></var>      <span class="initializer"> = 128</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.indian"><var class="varname">INDIAN</var></a></var>      <span class="initializer"> = 256</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.pacific"><var class="varname">PACIFIC</var></a></var>      <span class="initializer"> = 512</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.utc"><var class="varname">UTC</var></a></var>      <span class="initializer"> = 1024</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.all"><var class="varname">ALL</var></a></var>      <span class="initializer"> = 2047</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.all-with-bc"><var class="varname">ALL_WITH_BC</var></a></var>      <span class="initializer"> = 4095</span>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.datetimezone.php#datetimezone.constants.per-country"><var class="varname">PER_COUNTRY</var></a></var>      <span class="initializer"> = 4096</span>     ;</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$timezone</span></span>    )</div>           <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.getlocation.php" class="methodname" style="color:#CC7832">getLocation</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.getname.php" class="methodname" style="color:#CC7832">getName</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.getoffset.php" class="methodname" style="color:#CC7832">getOffset</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$datetime</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.gettransitions.php" class="methodname" style="color:#CC7832">getTransitions</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timestamp_begin</span><span class="initializer"> = <strong><span>PHP_INT_MIN</span></strong></span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timestamp_end</span><span class="initializer"> = <strong><span>PHP_INT_MAX</span></strong></span></span>   ]] )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.listabbreviations.php" class="methodname" style="color:#CC7832">listAbbreviations</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/datetimezone.listidentifiers.php" class="methodname" style="color:#CC7832">listIdentifiers</a></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$what</span><span class="initializer"> = DateTimeZone::ALL</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$country</span><span class="initializer"> = <strong><span>NULL</span></strong></span></span>   ]] )</div>      }</div>     </div>       <div class="section" id="datetimezone.constants">    <h2 class="title">预定义常量</h2>    <dl>            <dt id="datetimezone.constants.africa"><strong><span>DateTimeZone::AFRICA</span></strong></dt>       <dd>        <p class="para">Africa time zones.</p>      </dd>                  <dt id="datetimezone.constants.america"><strong><span>DateTimeZone::AMERICA</span></strong></dt>       <dd>        <p class="para">America time zones.</p>      </dd>                  <dt id="datetimezone.constants.antarctica"><strong><span>DateTimeZone::ANTARCTICA</span></strong></dt>       <dd>        <p class="para">Antarctica time zones.</p>      </dd>                  <dt id="datetimezone.constants.arctic"><strong><span>DateTimeZone::ARCTIC</span></strong></dt>       <dd>        <p class="para">Arctic time zones.</p>      </dd>                  <dt id="datetimezone.constants.asia"><strong><span>DateTimeZone::ASIA</span></strong></dt>       <dd>        <p class="para">Asia time zones.</p>      </dd>                  <dt id="datetimezone.constants.atlantic"><strong><span>DateTimeZone::ATLANTIC</span></strong></dt>       <dd>        <p class="para">Atlantic time zones.</p>      </dd>                  <dt id="datetimezone.constants.australia"><strong><span>DateTimeZone::AUSTRALIA</span></strong></dt>       <dd>        <p class="para">Australia time zones.</p>      </dd>                  <dt id="datetimezone.constants.europe"><strong><span>DateTimeZone::EUROPE</span></strong></dt>       <dd>        <p class="para">Europe time zones.</p>      </dd>                  <dt id="datetimezone.constants.indian"><strong><span>DateTimeZone::INDIAN</span></strong></dt>       <dd>        <p class="para">Indian time zones.</p>      </dd>                  <dt id="datetimezone.constants.pacific"><strong><span>DateTimeZone::PACIFIC</span></strong></dt>       <dd>        <p class="para">Pacific time zones.</p>      </dd>                  <dt id="datetimezone.constants.utc"><strong><span>DateTimeZone::UTC</span></strong></dt>       <dd>        <p class="para">UTC time zones.</p>      </dd>                  <dt id="datetimezone.constants.all"><strong><span>DateTimeZone::ALL</span></strong></dt>       <dd>        <p class="para">All time zones.</p>      </dd>                  <dt id="datetimezone.constants.all-with-bc"><strong><span>DateTimeZone::ALL_WITH_BC</span></strong></dt>       <dd>        <p class="para">All time zones including backwards compatible.</p>      </dd>                  <dt id="datetimezone.constants.per-country"><strong><span>DateTimeZone::PER_COUNTRY</span></strong></dt>       <dd>        <p class="para">Time zones per country.</p>      </dd>           </dl>    </div>     </div>                                                                  <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link DateTimeZone::__construct} — 创建新的DateTimeZone对象</li><li>{@link DateTimeZone::getLocation} — 返回与时区相关的定位信息。</li><li>{@link DateTimeZone::getName} — 返回时区名称。</li><li>{@link DateTimeZone::getOffset} — 返回相对于 GMT 的时差。</li><li>{@link DateTimeZone::getTransitions} — Returns all transitions for the timezone</li><li>{@link DateTimeZone::listAbbreviations} — 返回一个包含 dst (夏令时)，时差和时区信息的关联数组。</li><li>{@link DateTimeZone::listIdentifiers} — 返回一个包含了所有时区标示符的索引数组。</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.datetime.php">日期/时间</a></div></div>
*/
class DateTimeZone {
    const AFRICA = 1;
    const AMERICA = 2;
    const ANTARCTICA = 4;
    const ARCTIC = 8;
    const ASIA = 16;
    const ATLANTIC = 32;
    const AUSTRALIA = 64;
    const EUROPE = 128;
    const INDIAN = 256;
    const PACIFIC = 512;
    const UTC = 1024;
    const ALL = 2047;
    const ALL_WITH_BC = 4095;
    const PER_COUNTRY = 4096;


    /**
     * @param string $timezone
     * @link http://php.net/manual/en/datetimezone.construct.php
     */
    public function __construct ($timezone) {}

/**
*<div id="datetimezone.getname" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeZone::getName</h1>   <h1 class="refname">timezone_name_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeZone::getName</span> -- <span class="refname">timezone_name_get</span> &mdash; <span class="dc-title">返回时区名称。</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimezone.getname-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeZone::getName</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832">{@link timezone_name_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    )</div>    <p class="para rdfs-comment">    返回时区名称。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimezone.getname-parameters">   <h3 class="title">参数</h3>   <dl>          <dt> <span class="parameter" style="color:#2EACF9">object</span></dt>      <dd>       <span>       <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a>对象。      </span>     </dd>        </dl>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimezone.getname-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    <a href="http://php.net/manual/zh/timezones.php" class="link">时区名称</a>列表之一。   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimezone.php">DateTimeZone</a></div></div>
     * @return string*/
    public function getName () {}

/**
*<div id="datetimezone.getlocation" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeZone::getLocation</h1>   <h1 class="refname">timezone_location_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeZone::getLocation</span> -- <span class="refname">timezone_location_get</span> &mdash; <span class="dc-title">返回与时区相关的定位信息。</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimezone.getlocation-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeZone::getLocation</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832">{@link timezone_location_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    )</div>    <p class="para rdfs-comment">    返回与时区相关的定位信息，包括国家代码，纬度/经度和解释。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimezone.getlocation-parameters">   <h3 class="title">参数</h3>   <span>    <dl>      <dt> <span class="parameter" style="color:#2EACF9"> object</span></dt> <dd> <p class="para">仅过程化风格：由 <span class="function">{@link timezone_open()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> 对象。</p></dd>     </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimezone.getlocation-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    数组，包含与时区相关的定位信息。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetimezone.getlocation-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2680">     <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTimeZone::getLocation()</strong></span> 函数的范例：</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$tz&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">"Europe/Prague"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">print_r</span><span style="color: #007700">(</span><span style="color: #9876AA">$tz</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getLocation</span><span style="color: #007700">());<br /></span><span style="color: #9876AA">print_r</span><span style="color: #007700">(</span><span style="color: #9876AA">timezone_location_get</span><span style="color: #007700">(</span><span style="color: #9876AA">$tz</span><span style="color: #007700">));<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程会输出：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Array (     [country_code] =&gt; CZ     [latitude] =&gt; 50.08333     [longitude] =&gt; 14.43333     [comments] =&gt;  ) Array (     [country_code] =&gt; CZ     [latitude] =&gt; 50.08333     [longitude] =&gt; 14.43333     [comments] =&gt;  ) </span></div>     </div>    </div>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimezone.php">DateTimeZone</a></div></div>
     * @return array*/
    public function getLocation () {}

/**
*<div id="datetimezone.getoffset" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeZone::getOffset</h1>   <h1 class="refname">timezone_offset_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeZone::getOffset</span> -- <span class="refname">timezone_offset_get</span> &mdash; <span class="dc-title">返回相对于 GMT 的时差。</span></p>   </div>  <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimezone.getoffset-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeZone::getOffset</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$datetime</span></span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">int</span> <span class="methodname" style="color:#CC7832">{@link timezone_offset_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetime.php" class="type DateTime" style="color:#EAB766">DateTime</a></span> <span class="parameter" style="color:#2EACF9">$datetime</span></span>    )</div>    <p class="para rdfs-comment">    该函数返回 <span class="parameter" style="color:#2EACF9">datetime</span>日期 相对于 GMT 的时差。 GMT 时差是通过 DateTimeZone 对象的时区信息计算出来的。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimezone.getoffset-parameters">   <h3 class="title">参数</h3>   <span>    <dl>      <dt> <span class="parameter" style="color:#2EACF9"> object</span></dt> <dd> <p class="para">仅过程化风格：由 <span class="function">{@link timezone_open()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> 对象。</p></dd>            <dt> <span class="parameter" style="color:#2EACF9">datetime</span></dt>       <dd>        <p class="para">        用来计算时差的日期对象。        </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimezone.getoffset-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功时返回精确到秒的时差， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetimezone.getoffset-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2681">     <p><strong>Example #1 <span class="function"><strong style="color:#CC7832">DateTimeZone::getOffset()</strong></span> 例子</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Create&nbsp;two&nbsp;timezone&nbsp;objects,&nbsp;one&nbsp;for&nbsp;Taipei&nbsp;(Taiwan)&nbsp;and&nbsp;one&nbsp;for<br />//&nbsp;Tokyo&nbsp;(Japan)<br /></span><span style="color: #9876AA">$dateTimeZoneTaipei&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">"Asia/Taipei"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$dateTimeZoneJapan&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">"Asia/Tokyo"</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Create&nbsp;two&nbsp;DateTime&nbsp;objects&nbsp;that&nbsp;will&nbsp;contain&nbsp;the&nbsp;same&nbsp;Unix&nbsp;timestamp,&nbsp;but<br />//&nbsp;have&nbsp;different&nbsp;timezones&nbsp;attached&nbsp;to&nbsp;them.<br /></span><span style="color: #9876AA">$dateTimeTaipei&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"now"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$dateTimeZoneTaipei</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$dateTimeJapan&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">"now"</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">$dateTimeZoneJapan</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Calculate&nbsp;the&nbsp;GMT&nbsp;offset&nbsp;for&nbsp;the&nbsp;date/time&nbsp;contained&nbsp;in&nbsp;the&nbsp;$dateTimeTaipei<br />//&nbsp;object,&nbsp;but&nbsp;using&nbsp;the&nbsp;timezone&nbsp;rules&nbsp;as&nbsp;defined&nbsp;for&nbsp;Tokyo<br />//&nbsp;($dateTimeZoneJapan).<br /></span><span style="color: #9876AA">$timeOffset&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$dateTimeZoneJapan</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getOffset</span><span style="color: #007700">(</span><span style="color: #9876AA">$dateTimeTaipei</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;Should&nbsp;show&nbsp;int(32400)&nbsp;(for&nbsp;dates&nbsp;after&nbsp;Sat&nbsp;Sep&nbsp;8&nbsp;01:00:00&nbsp;1951&nbsp;JST).<br /></span><span style="color: #9876AA">var_dump</span><span style="color: #007700">(</span><span style="color: #9876AA">$timeOffset</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimezone.php">DateTimeZone</a></div></div>
     * @return int*/
    public function getOffset (DateTime $datetime) {}

/**
*<div id="datetimezone.gettransitions" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeZone::getTransitions</h1>   <h1 class="refname">timezone_transitions_get</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeZone::getTransitions</span> -- <span class="refname">timezone_transitions_get</span> &mdash; <span class="dc-title">Returns all transitions for the timezone</span></p>   </div>  <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimezone.gettransitions-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeZone::getTransitions</strong></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timestamp_begin</span><span class="initializer"> = <strong><span>PHP_INT_MIN</span></strong></span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timestamp_end</span><span class="initializer"> = <strong><span>PHP_INT_MAX</span></strong></span></span>   ]] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832">{@link timezone_transitions_get}</span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimezone.php" class="type DateTimeZone" style="color:#EAB766">DateTimeZone</a></span> <span class="parameter" style="color:#2EACF9">$object</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timestamp_begin</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$timestamp_end</span></span>   ]] )</div>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimezone.gettransitions-parameters">   <h3 class="title">参数</h3>   <span>    <dl>      <dt> <span class="parameter" style="color:#2EACF9"> object</span></dt> <dd> <p class="para">仅过程化风格：由 <span class="function">{@link timezone_open()}</span> 返回的 <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> 对象。</p></dd>            <dt> <span class="parameter" style="color:#2EACF9">timestamp_begin</span></dt>       <dd>        <p class="para">        Begin timestamp.       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">timestamp_end</span></dt>       <dd>        <p class="para">        End timestamp.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimezone.gettransitions-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns numerically indexed array containing associative array with all    transitions on success 或者在失败时返回 <strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetimezone.gettransitions-changelog">   <h3 class="title">更新日志</h3>   <span>    <table class="doctable informaltable">           <thead>       <tr>        <th>版本</th>        <th>说明</th>       </tr>       </thead>       <tbody class="tbody">       <tr>        <td>5.3.0</td>        <td>         The optional <span class="parameter" style="color:#2EACF9">timestamp_begin</span> and <span class="parameter" style="color:#2EACF9">timestamp_end</span>          were added.        </td>       </tr>       </tbody>         </table>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetimezone.gettransitions-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2682">     <p><strong>Example #1 A <span class="function">{@link timezone_transitions_get()}</span> example</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$timezone&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">(</span><span style="color: #DD0000">"Europe/London"</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$transitions&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$timezone</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getTransitions</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">print_r</span><span style="color: #007700">(</span><span style="color: #9876AA">array_slice</span><span style="color: #007700">(</span><span style="color: #9876AA">$transitions</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">0</span><span style="color: #007700">,&nbsp;</span><span style="color: #9876AA">3</span><span style="color: #007700">));<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Array (     [0] =&gt; Array         (             [ts] =&gt; -9223372036854775808             [time] =&gt; -292277022657-01-27T08:29:52+0000             [offset] =&gt; 3600             [isdst] =&gt; 1             [abbr] =&gt; BST         )      [1] =&gt; Array         (             [ts] =&gt; -1691964000             [time] =&gt; 1916-05-21T02:00:00+0000             [offset] =&gt; 3600             [isdst] =&gt; 1             [abbr] =&gt; BST         )      [2] =&gt; Array         (             [ts] =&gt; -1680472800             [time] =&gt; 1916-10-01T02:00:00+0000             [offset] =&gt; 0             [isdst] =&gt;              [abbr] =&gt; GMT         )  ) </span></div>     </div>    </div>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimezone.php">DateTimeZone</a></div></div>
     * @return array*/
    public function getTransitions ($timestamp_begin=null, $timestamp_end=null) {}


/**
*<div id="datetimezone.listabbreviations" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeZone::listAbbreviations</h1>   <h1 class="refname">timezone_abbreviations_list</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeZone::listAbbreviations</span> -- <span class="refname">timezone_abbreviations_list</span> &mdash; <span class="dc-title">返回一个包含 dst (夏令时)，时差和时区信息的关联数组。</span></p>   </div>  <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimezone.listabbreviations-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeZone::listAbbreviations</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832">{@link timezone_abbreviations_list}</span>     ( <span class="methodparam">void</span>    )</div>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimezone.listabbreviations-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功，返回数组， 或者在失败时返回 <strong><span>FALSE</span></strong>。   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetimezone.listabbreviations-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2683">     <p><strong>Example #1 <span class="function">{@link timezone_abbreviations_list()}</span> 函数的范例：</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$timezone_abbreviations&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">::</span><span style="color: #9876AA">listAbbreviations</span><span style="color: #007700">();<br /></span><span style="color: #9876AA">print_r</span><span style="color: #007700">(</span><span style="color: #9876AA">$timezone_abbreviations</span><span style="color: #007700">[</span><span style="color: #DD0000">"acst"</span><span style="color: #007700">]);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Array (     [0] =&gt; Array         (             [dst] =&gt; 1             [offset] =&gt; -14400             [timezone_id] =&gt; America/Porto_Acre         )      [1] =&gt; Array         (             [dst] =&gt; 1             [offset] =&gt; -14400             [timezone_id] =&gt; America/Eirunepe         )      [2] =&gt; Array         (             [dst] =&gt; 1             [offset] =&gt; -14400             [timezone_id] =&gt; America/Rio_Branco         )      [3] =&gt; Array         (             [dst] =&gt; 1             [offset] =&gt; -14400             [timezone_id] =&gt; Brazil/Acre         )  ) </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetimezone.listabbreviations-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="function">{@link timezone_identifiers_list()} - 别名 DateTimeZone::listIdentifiers</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimezone.php">DateTimeZone</a></div></div>
     * @return array*/
    public static function listAbbreviations () {}

/**
*<div id="datetimezone.listidentifiers" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateTimeZone::listIdentifiers</h1>   <h1 class="refname">timezone_identifiers_list</h1>   <p class="verinfo">(PHP 5 &gt;= 5.2.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateTimeZone::listIdentifiers</span> -- <span class="refname">timezone_identifiers_list</span> &mdash; <span class="dc-title">返回一个包含了所有时区标示符的索引数组。</span></p>   </div>  <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-datetimezone.listidentifiers-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832"><strong>DateTimeZone::listIdentifiers</strong></span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$what</span><span class="initializer"> = DateTimeZone::ALL</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$country</span><span class="initializer"> = <strong><span>NULL</span></strong></span></span>   ]] )</div>    <p class="para rdfs-comment">过程化风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="type" style="color:#EAB766">array</span> <span class="methodname" style="color:#CC7832">{@link timezone_identifiers_list}</span>     ([ <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$what</span><span class="initializer"> = DateTimeZone::ALL</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$country</span><span class="initializer"> = <strong><span>NULL</span></strong></span></span>   ]] )</div>   </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-datetimezone.listidentifiers-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">what</span></dt>       <dd>        <p class="para">        <a href="http://php.net/manual/zh/class.datetimezone.php" class="classname">DateTimeZone</a> 类中的常量之一。       </p>      </dd>                 <dt> <span class="parameter" style="color:#2EACF9">country</span></dt>       <dd>        <p class="para">        由两个字母组成，ISO 3166-1 兼容的国家代码。       </p>       <blockquote class="note" style="border:1px gray solid"><p><strong class="note" style="border:1px gray solid">Note</strong>:         <span class="simpara">         只有当 <span class="parameter" style="color:#2EACF9">what</span> 被设置为<strong><span>DateTimeZone::PER_COUNTRY</span></strong>时,该选项才会被使用。        </span>       </p></blockquote>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-datetimezone.listidentifiers-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    成功，返回数组，失败则返回<strong><span>FALSE</span></strong>.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-datetimezone.listidentifiers-changelog">   <h3 class="title">更新日志</h3>   <span>    <table class="doctable informaltable">           <thead>       <tr>        <th>版本</th>        <th>说明</th>       </tr>       </thead>       <tbody class="tbody">       <tr>        <td>5.3.0</td>        <td>         添加可选的 <span class="parameter" style="color:#2EACF9">what</span> 和         <span class="parameter" style="color:#2EACF9">country</span> 参数。        </td>       </tr>       </tbody>         </table>    </span>  </div>     <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-datetimezone.listidentifiers-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2684">     <p><strong>Example #1  <span class="function">{@link timezone_identifiers_list()}</span> 函数的范例：</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$timezone_identifiers&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateTimeZone</span><span style="color: #007700">::</span><span style="color: #9876AA">listIdentifiers</span><span style="color: #007700">();<br />for&nbsp;(</span><span style="color: #9876AA">$i</span><span style="color: #007700">=</span><span style="color: #9876AA">0</span><span style="color: #007700">;&nbsp;</span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">&lt;&nbsp;</span><span style="color: #9876AA">5</span><span style="color: #007700">;&nbsp;</span><span style="color: #9876AA">$i</span><span style="color: #007700">++)&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">"</span><span style="color: #9876AA">$timezone_identifiers</span><span style="color: #007700">[</span><span style="color: #9876AA">$i</span><span style="color: #007700">]</span><span style="color: #DD0000">\n"</span><span style="color: #007700">;<br />}<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程的输出类似于：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara </span></div>     </div>    </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-datetimezone.listidentifiers-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="function">{@link timezone_abbreviations_list()} - 别名 DateTimeZone::listAbbreviations</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.datetimezone.php">DateTimeZone</a></div></div>
     * @return array*/
    public static function listIdentifiers ($what=DateTimeZone::ALL, $country=null) {}

    /**
     * @link http://php.net/manual/en/datetime.wakeup.php
     */
    public function __wakeup(){}


    public static function __set_state($an_array) {}
}

/**
*<div id="class.dateinterval" class="reference">   <h1 class="title">DateInterval 类</h1>     <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p>     <div class="section" id="dateinterval.intro">    <h2 class="title">简介</h2>    <p class="para">       表示一个时间周期的类。    </p>    <p class="para">     一个时间周期表示固定量的时间（多少年，月，天，小时等），     也可以表示一个字符串格式的相对时间，     当表示相对时间的时候，字符串格式是 <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> 类的构造函数所支持的格式。    </p>   </div>     <div class="section" id="dateinterval.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">DateInterval</strong>      </span>      {</div>       <div class="classsynopsisinfo classsynopsisinfo_comment">// 属性 </div>     <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.y">$<var class="varname">y</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.m">$<var class="varname">m</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.d">$<var class="varname">d</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.h">$<var class="varname">h</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.i">$<var class="varname">i</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.s">$<var class="varname">s</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">float</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.f">$<var class="varname">f</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.invert">$<var class="varname">invert</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.pseudo-types.php#language.types.mixed" class="type mixed" style="color:#EAB766">mixed</a></span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateinterval.php#dateinterval.props.days">$<var class="varname">days</var></a></var>     ;</div>           <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateinterval.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$interval_spec</span></span>    )</div>           <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766">DateInterval</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateinterval.createfromdatestring.php" class="methodname" style="color:#CC7832">createFromDateString</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateinterval.format.php" class="methodname" style="color:#CC7832">format</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div>      }</div>     </div>      <div class="section" id="dateinterval.props">    <h2 class="title">属性</h2>    <dl>            <dt id="dateinterval.props.y"><var class="varname"><var class="varname">y</var></var></dt>       <dd>        <p class="para">        多少年。       </p>      </dd>                 <dt id="dateinterval.props.m"><var class="varname"><var class="varname">m</var></var></dt>       <dd>        <p class="para">        多少月。       </p>      </dd>                 <dt id="dateinterval.props.d"><var class="varname"><var class="varname">d</var></var></dt>       <dd>        <p class="para">        多少天。       </p>      </dd>                 <dt id="dateinterval.props.h"><var class="varname"><var class="varname">h</var></var></dt>       <dd>        <p class="para">        多少小时。       </p>      </dd>                 <dt id="dateinterval.props.i"><var class="varname"><var class="varname">i</var></var></dt>       <dd>        <p class="para">        多少分钟。       </p>      </dd>                 <dt id="dateinterval.props.s"><var class="varname"><var class="varname">s</var></var></dt>       <dd>        <p class="para">        多少秒。       </p>      </dd>                 <dt id="dateinterval.props.f"><var class="varname"><var class="varname">f</var></var></dt>       <dd>        <p class="para">        多少微秒。       </p>      </dd>                 <dt id="dateinterval.props.invert"><var class="varname"><var class="varname">invert</var></var></dt>       <dd>        <p class="para">        <em>1</em> 表示一个负的时间周期，        <em>0</em> 表示一个正的时间周期。        请参见： <span class="methodname" style="color:#CC7832">{@link DateInterval::format()}</span>.       </p>      </dd>                 <dt id="dateinterval.props.days"><var class="varname"><var class="varname">days</var></var></dt>       <dd>        <p class="para">        如果 DateInterval 对象是由        <span class="function">{@link DateTime::diff()}</span> 函数创建的，        那么它表示开始日期和结束日期之间包含了多少天。        否则，<var class="varname"><var class="varname">days</var></var> 属性为 <strong><span>FALSE</span></strong>。       </p>       <p class="para">        在 PHP 5.4.20/5.5.4 之前版本中，此属性不会为 <strong><span>FALSE</span></strong>，        而是 -99999。       </p>      </dd>          </dl>    </div>    <div class="section" id="dateinterval.changelog">    <h2 class="title">更新日志</h2>    <p class="para">     <table class="doctable informaltable">             <thead>        <tr>         <th>版本</th>         <th>说明</th>        </tr>        </thead>        <tbody class="tbody">        <tr>         <td>7.1.0</td>         <td>增加 <var class="varname"><var class="varname">f</var></var> 属性。</td>        </tr>        </tbody>           </table>     </p>   </div>   </div>                          <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link DateInterval::__construct} — Creates a new DateInterval object</li><li>{@link DateInterval::createFromDateString} — Sets up a DateInterval from the relative parts of the string</li><li>{@link DateInterval::format} — Formats the interval</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.datetime.php">日期/时间</a></div></div>
*/
class DateInterval {
    /**
     * Number of years
     * @var int
     */
    public $y;

    /**
     * Number of months
     * @var int
     */
    public $m;

    /**
     * Number of days
     * @var int
     */
    public $d;

    /**
     * Number of hours
     * @var int
     */
    public $h;

    /**
     * Number of minutes
     * @var int
     */
    public $i;

    /**
     * Number of seconds
     * @var int
     */
    public $s;

    /**
     * Number of microseconds
     * @since 7.1.0
     * @var float
     */
    public $f;

    /**
     * Is 1 if the interval is inverted and 0 otherwise
     * @var int
     */
    public $invert;

    /**
     * Total number of days the interval spans. If this is unknown, days will be FALSE.
     * @var mixed
     */
    public $days;


    /**
     * @param string $interval_spec
     * @link http://php.net/manual/en/dateinterval.construct.php
     * @throws \Exception when the interval_spec cannot be parsed as an interval.
     */
    public function __construct ($interval_spec) {}

/**
*<div id="dateinterval.format" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateInterval::format</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateInterval::format</span> &mdash; <span class="dc-title">Formats the interval</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-dateinterval.format-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">string</span> <span class="methodname" style="color:#CC7832"><strong>DateInterval::format</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$format</span></span>    )</div>    <p class="para rdfs-comment">    Formats the interval.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-dateinterval.format-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">format</span></dt>       <dd>        <p class="para">        <table class="doctable table">         <caption><strong>          The following characters are recognized in the          <span class="parameter" style="color:#2EACF9">format</span> parameter string.          Each format character must be prefixed by a percent sign          (<em>%</em>).         </strong></caption>                   <thead>           <tr>            <th><span class="parameter" style="color:#2EACF9">format</span> character</th>            <th>Description</th>            <th>Example values</th>           </tr>           </thead>           <tbody class="tbody">           <tr>            <td><em>%</em></td>            <td>Literal <em>%</em></td>            <td><em>%</em></td>           </tr>            <tr>            <td><em>Y</em></td>            <td>Years, numeric, at least 2 digits with leading 0</td>            <td><em>01</em>, <em>03</em></td>           </tr>            <tr>            <td><em>y</em></td>            <td>Years, numeric</td>            <td><em>1</em>, <em>3</em></td>           </tr>            <tr>            <td><em>M</em></td>            <td>Months, numeric, at least 2 digits with leading 0</td>            <td><em>01</em>, <em>03</em>, <em>12</em></td>           </tr>            <tr>            <td><em>m</em></td>            <td>Months, numeric</td>            <td><em>1</em>, <em>3</em>, <em>12</em></td>           </tr>            <tr>            <td><em>D</em></td>            <td>Days, numeric, at least 2 digits with leading 0</td>            <td><em>01</em>, <em>03</em>, <em>31</em></td>           </tr>            <tr>            <td><em>d</em></td>            <td>Days, numeric</td>            <td><em>1</em>, <em>3</em>, <em>31</em></td>           </tr>            <tr>            <td><em>a</em></td>            <td>Total number of days as a result of a <span class="methodname" style="color:#CC7832">{@link DateTime::diff()}</span> or <em>(unknown)</em> otherwise</td>            <td><em>4</em>, <em>18</em>, <em>8123</em></td>           </tr>            <tr>            <td><em>H</em></td>            <td>Hours, numeric, at least 2 digits with leading 0</td>            <td><em>01</em>, <em>03</em>, <em>23</em></td>           </tr>            <tr>            <td><em>h</em></td>            <td>Hours, numeric</td>            <td><em>1</em>, <em>3</em>, <em>23</em></td>           </tr>            <tr>            <td><em>I</em></td>            <td>Minutes, numeric, at least 2 digits with leading 0</td>            <td><em>01</em>, <em>03</em>, <em>59</em></td>           </tr>            <tr>            <td><em>i</em></td>            <td>Minutes, numeric</td>            <td><em>1</em>, <em>3</em>, <em>59</em></td>           </tr>            <tr>            <td><em>S</em></td>            <td>Seconds, numeric, at least 2 digits with leading 0</td>            <td><em>01</em>, <em>03</em>, <em>57</em></td>           </tr>            <tr>            <td><em>s</em></td>            <td>Seconds, numeric</td>            <td><em>1</em>, <em>3</em>, <em>57</em></td>           </tr>            <tr>            <td><em>F</em></td>            <td>Microseconds, numeric, at least 6 digits with leading            0</td>            <td><em>007701</em>, <em>052738</em>, <em>428291</em></td>           </tr>            <tr>            <td><em>f</em></td>            <td>Microseconds, numeric</td>            <td><em>7701</em>, <em>52738</em>, <em>428291</em></td>           </tr>            <tr>            <td><em>R</em></td>            <td>Sign &quot;<em>-</em>&quot; when negative, &quot;<em>+</em>&quot; when positive</td>            <td><em>-</em>, <em>+</em></td>           </tr>            <tr>            <td><em>r</em></td>            <td>Sign &quot;<em>-</em>&quot; when negative, empty when positive</td>            <td><em>-</em>, <em></td>           </tr>           </tbody>                 </table>        </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-dateinterval.format-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns the formatted interval.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 notes" id="refsect1-dateinterval.format-notes">   <h3 class="title">注释</h3>   <blockquote class="note" style="border:1px gray solid"><p><strong class="note" style="border:1px gray solid">Note</strong>:     <p class="para">     The <span class="methodname" style="color:#CC7832"><strong>DateInterval::format()</strong></span> method does not      recalculate carry over points in time strings nor in date segments. This      is expected because it is not possible to overflow values like <em>&quot;32 days&quot;</em>     which could be interpreted as anything from <em>&quot;1 month and 4 days&quot;</em>      to <em>&quot;1 month and 1 day&quot;</em>.    </p>   </p></blockquote>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 changelog" id="refsect1-dateinterval.format-changelog">   <h3 class="title">更新日志</h3>   <span>    <table class="doctable informaltable">           <thead>       <tr>        <th>版本</th>        <th>说明</th>       </tr>       </thead>       <tbody class="tbody">       <tr>        <td>7.1.0</td>        <td>The <em>F</em> and <em>f</em> format        characters were added.</td>       </tr>       </tbody>         </table>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-dateinterval.format-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2687">     <p><strong>Example #1 <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> example</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br />$interval&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P2Y4DT6H8M'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%d&nbsp;days'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程会输出：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 4 days </span></div>     </div>    </div>   </span>   <p class="para">    <div class="example" id="example-2688">     <p><strong>Example #2 <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> and carry over points</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br />$interval&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P32D'</span><span style="color: #007700">);<br />echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%d&nbsp;days'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 32 days </span></div>     </div>    </div>   </p>   <p class="para">    <div class="example" id="example-2689">     <p><strong>Example #3       <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> and       <span class="methodname" style="color:#CC7832">{@link DateTime::diff()}</span> with the %a and %d modifiers     </strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /><br />$january&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2010-01-01'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$february&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2010-02-01'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$interval&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$february</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">diff</span><span style="color: #007700">(</span><span style="color: #9876AA">$january</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">//&nbsp;%a&nbsp;will&nbsp;output&nbsp;the&nbsp;total&nbsp;number&nbsp;of&nbsp;days.<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%a&nbsp;total&nbsp;days'</span><span style="color: #007700">).</span><span style="color: #DD0000">"\n"</span><span style="color: #007700">;<br /><br /></span><span style="color: #FF8000">//&nbsp;While&nbsp;%d&nbsp;will&nbsp;only&nbsp;output&nbsp;the&nbsp;number&nbsp;of&nbsp;days&nbsp;not&nbsp;already&nbsp;covered&nbsp;by&nbsp;the<br />//&nbsp;month.<br /></span><span style="color: #007700">echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%m&nbsp;month,&nbsp;%d&nbsp;days'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>      <div class="example-contents"><p>以上例程会输出：</p></div>     <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 31 total days 1 month, 0 days </span></div>     </div>    </div>   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-dateinterval.format-seealso">   <h3 class="title">参见</h3>   <span>    <ul class="simplelist">     <li class="member"><span class="methodname" style="color:#CC7832">{@link DateTime::diff()} - Returns the difference between two DateTime objects</span></li>    </ul>   </span>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.dateinterval.php">DateInterval</a></div></div>
     * @return string*/
    public function format ($format) {}

/**
*<div id="dateinterval.createfromdatestring" class="refentry">  <div class="refnamediv">   <h1 class="refname">DateInterval::createFromDateString</h1>   <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p><p class="refpurpose"><span class="refname">DateInterval::createFromDateString</span> &mdash; <span class="dc-title">Sets up a DateInterval from the relative parts of the string</span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-dateinterval.createfromdatestring-description">   <h3 class="title">说明</h3>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="modifier">static</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="methodname" style="color:#CC7832"><strong>DateInterval::createFromDateString</strong></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$time</span></span>    )</div>    <p class="para rdfs-comment">    Uses the normal date parsers and sets up a DateInterval from the relative    parts of the parsed string.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-dateinterval.createfromdatestring-parameters">   <h3 class="title">参数</h3>   <span>    <dl>            <dt> <span class="parameter" style="color:#2EACF9">time</span></dt>       <dd>        <p class="para">        A date with relative parts. Specifically, the        <a href="http://php.net/manual/zh/datetime.formats.relative.php" class="link">relative formats</a>        supported by the parser used for <span class="function">{@link strtotime()}</span> and        <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> will be used to construct the        DateInterval.       </p>      </dd>          </dl>    </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-dateinterval.createfromdatestring-examples">   <h3 class="title">范例</h3>   <span>    <div class="example" id="example-2686">     <p><strong>Example #1 Parsing valid date intervals</strong></p>     <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br /></span><span style="color: #FF8000">//&nbsp;Each&nbsp;set&nbsp;of&nbsp;intervals&nbsp;is&nbsp;equal.<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1D'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'1&nbsp;day'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P2W'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'2&nbsp;weeks'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P3M'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'3&nbsp;months'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P4Y'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'4&nbsp;years'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1Y1D'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'1&nbsp;year&nbsp;+&nbsp;1&nbsp;day'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1DT12H'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'1&nbsp;day&nbsp;+&nbsp;12&nbsp;hours'</span><span style="color: #007700">);<br /><br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'PT3600S'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$i&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">::</span><span style="color: #9876AA">createFromDateString</span><span style="color: #007700">(</span><span style="color: #DD0000">'3600&nbsp;seconds'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>     </div>     </div>   </span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-dateinterval.createfromdatestring-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns a new <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> instance.   </p>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.dateinterval.php">DateInterval</a></div></div>
     * @return DateInterval*/
    public static function createFromDateString ($time) {}

    public function __wakeup() {}

    public static function __set_state($an_array) {}
}

/**
*<div id="class.dateperiod" class="reference">   <h1 class="title">DatePeriod 类</h1>     <div class="partintro"><p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7)</p>     <div class="section" id="dateperiod.intro">    <h2 class="title">简介</h2>    <p class="para">     DatePeriod 类表示一个时间周期。    </p>    <p class="para">     一个时间周期可以用来在给定的一段时间之内，     以一定的时间间隔进行迭代。    </p>   </div>     <div class="section" id="dateperiod.synopsis">    <h2 class="title">类摘要</h2>      <div class="classsynopsis">     <div class="ooclass"></div>       <div class="classsynopsisinfo">      <span class="ooclass">       <strong class="classname">DatePeriod</strong>      </span>            <span class="oointerface">implements        <span class="interfacename"><strong class="interfacename">Traversable</strong></span>      </span>      {</div>      <div class="classsynopsisinfo classsynopsisinfo_comment">// 常量 </div>     <div class="fieldsynopsis">      <span class="modifier">const</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="fieldsynopsis_varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.constants.exclude-start-date"><var class="varname">EXCLUDE_START_DATE</var></a></var>      <span class="initializer"> = 1</span>     ;</div>       <div class="classsynopsisinfo classsynopsisinfo_comment">// 属性 </div>     <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">integer</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.props.recurrences">$<var class="varname">recurrences</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766">boolean</span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.props.include_start_date">$<var class="varname">include_start_date</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.props.start">$<var class="varname">start</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.props.current">$<var class="varname">current</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.props.end">$<var class="varname">end</var></a></var>     ;</div>      <div class="fieldsynopsis">      <span class="modifier">public</span>      <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span>       <var class="varname"><a href="http://php.net/manual/zh/class.dateperiod.php#dateperiod.props.interval">$<var class="varname">interval</var></a></var>     ;</div>       <div class="classsynopsisinfo classsynopsisinfo_comment">// 方法 </div>     <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateperiod.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$start</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$recurrences</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>   ] )</div> <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateperiod.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$start</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="parameter" style="color:#2EACF9">$interval</span></span>    , <span class="methodparam"><span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="parameter" style="color:#2EACF9">$end</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>   ] )</div> <div class="constructorsynopsis dc-description">    <span class="modifier">public</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateperiod.construct.php" class="methodname" style="color:#CC7832">__construct</a></span>     ( <span class="methodparam"><span class="type" style="color:#EAB766">string</span> <span class="parameter" style="color:#2EACF9">$isostr</span></span>    [, <span class="methodparam"><span class="type" style="color:#EAB766">int</span> <span class="parameter" style="color:#2EACF9">$options</span></span>   ] )</div>           <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateInterval</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateperiod.getdateinterval.php" class="methodname" style="color:#CC7832">getDateInterval</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeInterface</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateperiod.getenddate.php" class="methodname" style="color:#CC7832">getEndDate</a></span>     ( <span class="methodparam">void</span>    )</div> <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766">DateTimeInterface</span> <span class="methodname" style="color:#CC7832"><a href="http://php.net/manual/zh/dateperiod.getstartdate.php" class="methodname" style="color:#CC7832">getStartDate</a></span>     ( <span class="methodparam">void</span>    )</div>      }</div>     </div>       <div class="section" id="dateperiod.constants">    <h2 class="title">预定义常量</h2>    <dl>            <dt id="dateperiod.constants.exclude-start-date"><strong><span>DatePeriod::EXCLUDE_START_DATE</span></strong></dt>       <dd>        <p class="para">在 <span class="function">{@link DatePeriod::__construct()}</span> 构造函数中使用，表示不包含开始时间。</p>      </dd>           </dl>    </div>     <div class="section" id="dateperiod.props">    <h2 class="title">属性</h2>    <dl>            <dt id="dateperiod.props.recurrences"><var class="varname"><var class="varname">recurrences</var></var></dt>       <dd>        <p class="para">        循环次数。       </p>      </dd>                 <dt id="dateperiod.props.include_start_date"><var class="varname"><var class="varname">include_start_date</var></var></dt>       <dd>        <p class="para">        在循环过程中，是否包含开始时间。       </p>      </dd>                 <dt id="dateperiod.props.start"><var class="varname"><var class="varname">start</var></var></dt>       <dd>        <p class="para">         时间周期的开始时间。       </p>      </dd>                 <dt id="dateperiod.props.current"><var class="varname"><var class="varname">current</var></var></dt>       <dd>        <p class="para">        表示在时间周期内迭代的时候，当前的时间。       </p>      </dd>                 <dt id="dateperiod.props.end"><var class="varname"><var class="varname">end</var></var></dt>       <dd>        <p class="para">        时间周期的结束时间。       </p>      </dd>                 <dt id="dateperiod.props.interval"><var class="varname"><var class="varname">interval</var></var></dt>       <dd>        <p class="para">        ISO 8601 格式的间隔。       </p>      </dd>          </dl>    </div>    <div class="section" id="dateperiod.changelog">    <h2 class="title">更新日志</h2>    <p class="para">     <table class="doctable informaltable">             <thead>        <tr>         <th>版本</th>         <th>说明</th>        </tr>        </thead>        <tbody class="tbody">        <tr>         <td>5.3.27, 5.4.17</td>         <td>          公开以下属性：<var class="varname"><var class="varname">recurrences</var></var>，          <var class="varname"><var class="varname">include_start_date</var></var>，<var class="varname"><var class="varname">start</var></var>，          <var class="varname"><var class="varname">current</var></var>，<var class="varname"><var class="varname">end</var></var> 和          <var class="varname"><var class="varname">interval</var></var>。         </td>        </tr>        </tbody>           </table>     </p>   </div>   </div>                                 <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li>{@link DatePeriod::__construct} — Creates a new DatePeriod object</li><li>{@link DatePeriod::getDateInterval} — Gets the interval</li><li>{@link DatePeriod::getEndDate} — Gets the end date</li><li>{@link DatePeriod::getStartDate} — Gets the start date</li></ul> <div class="up"><a href="http://php.net/manual/zh/book.datetime.php">日期/时间</a></div></div>
*/
class DatePeriod implements Traversable {
    const EXCLUDE_START_DATE = 1;
    
    /**
     * Start date
     * @var DateTimeInterface
     */
    public $start;

    /**
     * Current iterator value.
     * @var DateTimeInterface|null
     */
    public $current;
    
    /**
     * End date.
     * @var DateTimeInterface|null
     */
    public $end;
    
    /**
     * The interval
     * @var DateInterval
     */
    public $interval;
    
    /**
     * Number of recurrences.
     * @var int
     */
    public $recurrences;
    
    /**
     * Start of period.
     * @var bool
     */
    public $include_start_date;
    
    /**
     * @param DateTimeInterface $start
     * @param DateInterval $interval
     * @param DateTimeInterface $end
     * @param int $options Can be set to DatePeriod::EXCLUDE_START_DATE.
     * @link http://php.net/manual/en/dateperiod.construct.php
     * @since 5.3.0
     */
    public function __construct (DateTimeInterface $start, DateInterval $interval, DateTimeInterface $end, $options=0) {}

    /**
     * @param DateTimeInterface $start
     * @param DateInterval $interval
     * @param int $recurrences Number of recurrences
     * @param int $options Can be set to DatePeriod::EXCLUDE_START_DATE.
     * @link http://php.net/manual/en/dateperiod.construct.php
     * @since 5.3.0
     */
    public function __construct (DateTimeInterface $start, DateInterval $interval, $recurrences, $options=0) {}

    /**
     * @param string $isostr String containing the ISO interval.
     * @param int $options Can be set to DatePeriod::EXCLUDE_START_DATE.
     * @link http://php.net/manual/en/dateperiod.construct.php
     * @since 5.3.0
     */
    public function __construct ($isostr, $options=0) {}

/**
*<div id="dateperiod.getdateinterval" class="refentry">  <div class="refnamediv">   <h1 class="refname">DatePeriod::getDateInterval</h1>   <p class="verinfo">(PHP 5 &gt;= 5.6.5, PHP 7)</p><p class="refpurpose"><span class="refname">DatePeriod::getDateInterval</span> &mdash; <span class="dc-title">    Gets the interval   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-dateperiod.getdateinterval-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.dateinterval.php" class="type DateInterval" style="color:#EAB766">DateInterval</a></span> <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getDateInterval</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Gets a <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    representing the interval used for the period.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-dateperiod.getdateinterval-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-dateperiod.getdateinterval-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns a <a href="http://php.net/manual/zh/class.dateinterval.php" class="classname">DateInterval</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-dateperiod.getdateinterval-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2692">    <p><strong>Example #1 <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getDateInterval()</strong></span> example</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$period&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DatePeriod</span><span style="color: #007700">(</span><span style="color: #DD0000">'R7/2016-05-16T00:00:00Z/P1D'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$interval&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$period</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getDateInterval</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">$interval</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #DD0000">'%d&nbsp;day'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 1 day </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-dateperiod.getdateinterval-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="methodname" style="color:#CC7832">{@link DatePeriod::getStartDate()} - Gets the start date</span></li>    <li class="member"><span class="methodname" style="color:#CC7832">{@link DatePeriod::getEndDate()} - Gets the end date</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.dateperiod.php">DatePeriod</a></div></div>
     * @return DateInterval*/
    public function getDateInterval () {}

/**
*<div id="dateperiod.getenddate" class="refentry">  <div class="refnamediv">   <h1 class="refname">DatePeriod::getEndDate</h1>   <p class="verinfo">(PHP 5 &gt;= 5.6.5, PHP 7)</p><p class="refpurpose"><span class="refname">DatePeriod::getEndDate</span> &mdash; <span class="dc-title">    Gets the end date   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-dateperiod.getenddate-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getEndDate</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Gets the end date of the period.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-dateperiod.getenddate-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-dateperiod.getenddate-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns <strong><span>NULL</span></strong> if the <a href="http://php.net/manual/zh/class.dateperiod.php" class="classname">DatePeriod</a> does    not have an end date. For example, when initialized with the    <span class="parameter" style="color:#2EACF9">recurrences</span> parameter, or the    <span class="parameter" style="color:#2EACF9">isostr</span> parameter without an    end date.   </p>   <p class="para">    Returns a <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    when the <a href="http://php.net/manual/zh/class.dateperiod.php" class="classname">DatePeriod</a> is initialized with a    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    as the <span class="parameter" style="color:#2EACF9">end</span> parameter.   </p>   <p class="para">    Returns a <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    otherwise.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-dateperiod.getenddate-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2693">    <p><strong>Example #1 <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getEndDate()</strong></span> example</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$period&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DatePeriod</span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2016-05-16T00:00:00Z'</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1D'</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2016-05-20T00:00:00Z'</span><span style="color: #007700">)<br />);<br /></span><span style="color: #9876AA">$start&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$period</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getEndDate</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">$start</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">ISO8601</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2016-05-20T00:00:00+0000 </span></div>    </div>   </div>   <div class="example" id="example-2694">    <p><strong>Example #2 <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getEndDate()</strong></span> without an end date</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$period&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DatePeriod</span><span style="color: #007700">(<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">(</span><span style="color: #DD0000">'2016-05-16T00:00:00Z'</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;&nbsp;new&nbsp;</span><span style="color: #9876AA">DateInterval</span><span style="color: #007700">(</span><span style="color: #DD0000">'P1D'</span><span style="color: #007700">),<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #9876AA">7<br /></span><span style="color: #007700">);<br /></span><span style="color: #9876AA">var_dump</span><span style="color: #007700">(</span><span style="color: #9876AA">$period</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getEndDate</span><span style="color: #007700">());<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> NULL </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-dateperiod.getenddate-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="methodname" style="color:#CC7832">{@link DatePeriod::getStartDate()} - Gets the start date</span></li>    <li class="member"><span class="methodname" style="color:#CC7832">{@link DatePeriod::getDateInterval()} - Gets the interval</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.dateperiod.php">DatePeriod</a></div></div>
     * @return DateTimeInterface|null*/
    public function getEndDate () {}

/**
*<div id="dateperiod.getstartdate" class="refentry">  <div class="refnamediv">   <h1 class="refname">DatePeriod::getStartDate</h1>   <p class="verinfo">(PHP 5 &gt;= 5.6.5, PHP 7)</p><p class="refpurpose"><span class="refname">DatePeriod::getStartDate</span> &mdash; <span class="dc-title">    Gets the start date   </span></p>   </div>   <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 description" id="refsect1-dateperiod.getstartdate-description">   <h3 class="title">说明</h3>   <p class="para">面向对象风格</p>   <div class="methodsynopsis dc-description" style="border:1px gray;padding-left:5px;background:#232525">    <span class="modifier">public</span> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/class.datetimeinterface.php" class="type DateTimeInterface" style="color:#EAB766">DateTimeInterface</a></span> <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getStartDate</strong></span>     ( <span class="methodparam">void</span>    )</div>    <p class="para rdfs-comment">    Gets the start date of the period.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 parameters" id="refsect1-dateperiod.getstartdate-parameters">   <h3 class="title">参数</h3>   <span>此函数没有参数。</span>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 returnvalues" id="refsect1-dateperiod.getstartdate-returnvalues">   <h3 class="title">返回值</h3>   <p class="para">    Returns a <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    when the <a href="http://php.net/manual/zh/class.dateperiod.php" class="classname">DatePeriod</a> is initialized with a    <a href="http://php.net/manual/zh/class.datetimeimmutable.php" class="classname">DateTimeImmutable</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    as the <span class="parameter" style="color:#2EACF9">start</span> parameter.   </p>   <p class="para">    Returns a <a href="http://php.net/manual/zh/class.datetime.php" class="classname">DateTime</a> <span class="type" style="color:#EAB766"><a href="http://php.net/manual/zh/language.types.object.php" class="type object" style="color:#EAB766">object</a></span>    otherwise.   </p>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 examples" id="refsect1-dateperiod.getstartdate-examples">   <h3 class="title">范例</h3>   <div class="example" id="example-2695">    <p><strong>Example #1 <span class="methodname" style="color:#CC7832"><strong>DatePeriod::getStartDate()</strong></span> example</strong></p>    <div class="example-contents"> <div class="phpcode" style="border-color:gray;background:#232525"><span><span style="color: #000000"> <span style="color: #9876AA">&lt;?php<br />$period&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #9876AA">DatePeriod</span><span style="color: #007700">(</span><span style="color: #DD0000">'R7/2016-05-16T00:00:00Z/P1D'</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">$start&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #9876AA">$period</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">getStartDate</span><span style="color: #007700">();<br />echo&nbsp;</span><span style="color: #9876AA">$start</span><span style="color: #007700">-&gt;</span><span style="color: #9876AA">format</span><span style="color: #007700">(</span><span style="color: #9876AA">DateTime</span><span style="color: #007700">::</span><span style="color: #9876AA">ISO8601</span><span style="color: #007700">);<br /></span><span style="color: #9876AA">?&gt;</span> </span> </span></div>    </div>     <div class="example-contents"><p>以上例程会输出：</p></div>    <div class="example-contents screen" style="background:black;padding-left:5px;"> <div class="cdata"><span> 2016-05-16T00:00:00+0000 </span></div>    </div>   </div>  </div>    <br></br><div style="BORDER-TOP: gray 1px dashed; OVERFLOW: hidden; HEIGHT: 1px"></div><div class="refsect1 seealso" id="refsect1-dateperiod.getstartdate-seealso">   <h3 class="title">参见</h3>   <ul class="simplelist">    <li class="member"><span class="methodname" style="color:#CC7832">{@link DatePeriod::getEndDate()} - Gets the end date</span></li>    <li class="member"><span class="methodname" style="color:#CC7832">{@link DatePeriod::getDateInterval()} - Gets the interval</span></li>   </ul>  </div>   <div class="up"><a href="http://php.net/manual/zh/class.dateperiod.php">DatePeriod</a></div></div>
     * @return DateTimeInterface*/
    public function getStartDate () {}

    public static function __set_state (){}

    public function __wakeup() {}

}
